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

原文地址:https://www.cnblogs.com/sunjiguang/p/5280813.html