rt,在使用mybatis的注解,更新一些数据时,sql是这样写的。文件是groovy,编译的时候报错,无法build
to be an inline constant of type java.lang.String in @org.apache.ibatis.annotations
以及
Error:Groovyc: Attribute ‘value’ should have type ‘java.lang.String’; but found type 'java.lang.Object
在网上找了些资料,也没有具体方案,发现改掉${}这个占位符之后是没问题的。
解决办法:
将script标签前后的三个双引号,改为单引号即可
编译通过,正常执行