mybatis-plus 异常 Invalid bound statement (not found)

最近吧项目中添加使用了mybatis-plus,发现操作sql的时候出现异常:

Invalid bound statement (not found)

,异常位置位于mybatis-plus的jar中。网上大多结果是让进行各种配置文件的检查。因为程序之前正常,所以肯定是添加mybatis-plus导致的。

http://blog.sina.com.cn/s/blog_4a5dbd380102xn97.html  此文完美解决问题。

主要原因就是要给mybatis-plus在application.yml中添加上指定的mapper.xml的位置。

原:

mybatis:
    mapper-locations: classpath:mapper/*.xml
    type-aliases-package: com.xx.cc.model.po

现:

mybatis-plus:
    mapper-locations: classpath:mapper/*.xml
mybatis:
    mapper-locations: classpath:mapper/*.xml
    type-aliases-package: com.xx.cc.model.po

猜你喜欢

转载自www.cnblogs.com/dxxdsw/p/10822304.html