使用mybatis逆向工具生成dao包存放位置的两种方式

mybatis.mapperLocations=classpath:mapping/*.xml


// 直接在application.properties中添加

 

<resources>
 <resource>
 <directory>src/main/java</directory>
 <includes>
 <include>**/*.xml</include>
 </includes>
 </resource>
</resources>

默认情况下,Mybatis 的 xml 映射文件不会编译到 target 的 class 目录下,所
以我们需要在 pom.xml 文件中配置 resource

 

posted @ 2021-05-21 17:17  呵呵可笑  阅读(89)  评论(0)    收藏  举报