首页 > 其他分享 >springboot mybatis-plus dao层调用异常 Invalid bound statement (not found)

springboot mybatis-plus dao层调用异常 Invalid bound statement (not found)

时间:2022-10-26 16:36:15浏览次数:72  
标签:mapper springboot dao bound Invalid statement found

记录一次打包事故。

 

 和同事共同开发项目。开发时访问都是ok。打包后再访问一直报

org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.hzfc.SJGL.YQYD.dao.TJkpremovalListMapper2.getTrend。所谓见多识广。这个问题之前遇到过不少。xml没有映射成功 so easy。再去解析后的war包中查看。发现有xml文件。namespace也都映射没问题。
难道是注解mapper没加。再一看mapper添加过了呀。折腾了个把小时回头一看,原来是mapper文件名不一样。开发环境mapper映射对大小写不敏感(即大小写不一样可以自动识别匹配)。打包后再访问会严格识别大小写。在此记录此次生产事故。

标签:mapper,springboot,dao,bound,Invalid,statement,found
From: https://www.cnblogs.com/fire-light/p/16828899.html

相关文章