mybatis出現問題與mybatis-plus基本一致的,可以先參考我的另一篇文章:https://www.cnblogs.com/zhoushiya/p/12797240.html
但是這里需要注意,mybatis-plus對mapper-locations進行了默認設置,而且與mybatis的不一樣。
當mybatis中mapper類與mapper.xml不在同一個命名空間,就需要在application.yml中自定義mapper-locations:
如上圖,ArticleMapper.xml在mapper/testdb下,但是ArticleMapper.java在com.zhoushiya.springbootstudy.testdb.mapper下,這時就需要在application.yml中定義mapper.xml的文件位置。