Browse Source

通用mybatis-config移入admin模块

pull/90/MERGE
RuoYi 6 years ago
parent
commit
c78802481e
  1. 2
      ruoyi-admin/src/main/resources/application.yml
  2. 30
      ruoyi-admin/src/main/resources/mybatis/mybatis-config.xml

2
ruoyi-admin/src/main/resources/application.yml

@ -75,7 +75,7 @@ mybatis:
# 配置mapper的扫描,找到所有的mapper.xml映射文件 # 配置mapper的扫描,找到所有的mapper.xml映射文件
mapperLocations: classpath*:mapper/**/*Mapper.xml mapperLocations: classpath*:mapper/**/*Mapper.xml
# 加载全局的配置文件 # 加载全局的配置文件
configLocation: classpath:mapper/mybatis-config.xml configLocation: classpath:mybatis/mybatis-config.xml
# PageHelper分页插件 # PageHelper分页插件
pagehelper: pagehelper:

30
ruoyi-system/src/main/resources/mapper/mybatis-config.xml → ruoyi-admin/src/main/resources/mybatis/mybatis-config.xml

@ -1,15 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE configuration <!DOCTYPE configuration
PUBLIC "-//mybatis.org//DTD Config 3.0//EN" PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-config.dtd"> "http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration> <configuration>
<settings> <settings>
<setting name="cacheEnabled" value="true" /> <!-- 全局映射器启用缓存 --> <setting name="cacheEnabled" value="true" /> <!-- 全局映射器启用缓存 -->
<setting name="useGeneratedKeys" value="true" /> <!-- 允许 JDBC 支持自动生成主键 --> <setting name="useGeneratedKeys" value="true" /> <!-- 允许 JDBC 支持自动生成主键 -->
<setting name="defaultExecutorType" value="REUSE" /> <!-- 配置默认的执行器 --> <setting name="defaultExecutorType" value="REUSE" /> <!-- 配置默认的执行器 -->
<setting name="logImpl" value="SLF4J" /> <!-- 指定 MyBatis 所用日志的具体实现 --> <setting name="logImpl" value="SLF4J" /> <!-- 指定 MyBatis 所用日志的具体实现 -->
<!-- <setting name="mapUnderscoreToCamelCase" value="true"/> 驼峰式命名 --> <!-- <setting name="mapUnderscoreToCamelCase" value="true"/> 驼峰式命名 -->
</settings> </settings>
</configuration> </configuration>
Loading…
Cancel
Save