wayn111 / mybatis-xmlreload-spring-boot-starter

mybatis-xmlreload-spring-boot-starter 支持xml文件热更新
Apache License 2.0
57 stars 19 forks source link

mybatis-xmlreload-spring-boot-starter

mybatis-xmlreload-spring-boot-starter 支持xml文件热更新功能。Spring Boot2.0项目请使用 2.0.5.m3 版本。

分支名称 Spring Boot版本 Mybatis Xmlreload版本
main 3.0.4 3.0.5.m3
springboot2 2.2.7.RELEASE 2.0.5.m3

原理

兼容

安装

在 Spring Boot3.0 Maven 项目提供坐标地址如下:

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

在 Spring Boot2.0 Maven 项目提供坐标地址如下:

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

使用配置

mybatis-xmlreload-spring-boot-starter 目前只有两个配置属性。

# mybatis xml文件热加载配置
mybatis-xml-reload:
  # 是否开启 xml 热更新,true开启,false不开启,默认为false
  enabled: true
  # xml文件路径,可以填写多个,逗号分隔。如果想将xml文件放在指定目录而不是jar包内,可以用file前缀指定本地目录,例如 file:/c/mapper/*.xml
  # eg: `classpath:mapper/**/*Mapper.xml,file:/c/mapper/*.xml`
  mapper-locations: classpath:mapper/*Mapper.xml

学习交流

如果有任何问题,欢迎提交Issue或加我微信告知,方便互相交流反馈~ 💘。最后,喜欢的话麻烦给我个star

关注公众号:程序员wayn,每周更新最新技术文章。回复关键字: