使用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

浙公网安备 33010602011771号