mapper自动加载

1.pom.xml配置

        <dependency>
         <groupId>io.github.wayn111</groupId>
         <artifactId>mybatis-xmlreload-spring-boot-starter</artifactId>
         <version>2.0.5.m3</version>
        </dependency>

2.application.properties配置

mybatis-xml-reload.enabled=true
mybatis-xml-reload.mapper-locations=classpath*:/**/*mapper.xml

3.引用地址

https://github.com/wayn111/mybatis-xmlreload-spring-boot-starter

4.若不生效则在项目中手动引入

 

posted @ 2024-09-26 13:28  Recouar  阅读(6)  评论(0编辑  收藏  举报