org.apache.ibatis.ognl.NoSuchPropertyException:java.lang.Float.length
- 错误原因:sql语句中动态标签
<if test="price!=null and price.length>0">price=#{price},</if>
- 解决方法:删除 sql语句关于Float类型的length判断=> and price.length>0
- 错误信息
Caused by: org.apache.ibatis.builder.BuilderException: Error evaluating expression 'price!=null and price.length>0'. Cause: org.apache.ibatis.ognl.NoSuchPropertyException: java.lang.Float.length
at org.apache.ibatis.scripting.xmltags.OgnlCache.getValue(OgnlCache.java:46)
at org.apache.ibatis.scripting.xmltags.ExpressionEvaluator.evaluateBoolean(ExpressionEvaluator.java:32)
at org.apache.ibatis.scripting.xmltags.IfSqlNode.apply(IfSqlNode.java:34)
at org.apache.ibatis.scripting.xmltags.MixedSqlNode.apply(MixedSqlNode.java:33)
at org.apache.ibatis.scripting.xmltags.TrimSqlNode.apply(TrimSqlNode.java:55)
....................................
Caused by: org.apache.ibatis.ognl.NoSuchPropertyException: java.lang.Float.length