自定義sql報(bào)錯(cuò)
自定義sql報(bào)錯(cuò):org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.builder.BuilderException: Error evaluating expression 'ew.customSqlSegment'. Cause: org.apache.ibatis.ognl.NoSuchPropertyException: com.baomidou.mybatisplus.core.conditions.query.QueryWrapper.customSqlSegment
代碼如下:
2019-08-27
剛才的答案不準(zhǔn)確,MP從3.0.7開始,支持這種寫法,你MP的版本大于等于3.0.7嗎?
2019-08-27
請問你用的是MP的什么版本?我的印象中,低版本不支持在注解中這樣寫ew.customSqlSegment,只支持xml的自定義sql