这是脚本(Scccc.groovy):
import scriptParents.ScriptGroovyParent
println(queryThisBaby("my query"));
这是超类:
class ScriptGroovyParent {
public ScriptGroovyParent() {
// TODO Auto-generated constructor stub
}
// public String queryThisBaby(String query){
//
// return query +" was run.";
// }
def queryThisBaby(name) {
return name +" was run."
}
}
虽然在尝试运行脚本时出现错误。
Caught: groovy.lang.MissingMethodException: No signature of method: scripts.Scccc.queryThisBaby() is applicable for argument types: (java.lang.String) values: [my query]
groovy.lang.MissingMethodException: No signature of method: scripts.Scccc.queryThisBaby() is applicable for argument types: (java.lang.String) values: [my query]
at scripts.Scccc.run(Scccc.groovy:5)
怎么会这样?