groovy --不注意的小错误(java.lang.String.positive() is applicable)

sql 语句拼接报错:

     No signature of method: java.lang.String.positive() is applicable for argument types: () values: []

原因:字符串相加时,加号前后有空格

例如(这样是不行的):

sql =+ "and c.efficientStatus = "+courseStatus    //错误

 

要把加号后面的空格去掉就行了,简直了。

 

 

新手的学习笔记:这是自己学习过程中的记录,方便自己回顾,好记性不如烂笔头,多多指教。

作者:艺至

         ----2016-03-15 19:28:44

 

文章来自:http://www.cnblogs.com/sunjiguang/p/5280813.html
© 2021 jiaocheng.bubufx.com  联系我们
ICP备案:鲁ICP备09046678号-3