orm: multi-datasource-enable: true # 多数据源开关 ################## Alibaba Druid 配置 ################## spring: datasource: # type: com.alibaba.druid.pool.DruidDataSource druid: stat-view-servlet: enabled: true login-username: root login-password: root reset-enable: false jta: atomikos: properties: serial-jta-transactions: false ################## 数据源 配置 ################## ######## 单数据源使用sys作为默认数据源 ############ datasource: sys: name: system url: jdbc:mysql://127.0.0.1:3306/archives_sys?pinGlobalTxToPhysicalConnection=true&useUnicode=true&characterEncoding=utf-8&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC&zeroDateTimeBehavior=convertToNull driver-class-name: com.mysql.jdbc.Driver username: root password: root test-on-borrow: false test-on-return: false test-while-idle: true validation-query: SELECT 1 async-init: false filters: log4j,wall,mergeStat keep-alive: false initial-size: 5 min-idle: 5 max-active: 20 time-between-eviction-runs-millis: 60000 min-evictable-idle-time-millis: 30000 bus: name: business url: jdbc:mysql://127.0.0.1:3306/archives_mgr?pinGlobalTxToPhysicalConnection=true&useUnicode=true&characterEncoding=utf-8&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC&zeroDateTimeBehavior=convertToNull driver-class-name: com.mysql.jdbc.Driver username: root password: root test-on-borrow: false test-on-return: false test-while-idle: true validation-query: SELECT 1 async-init: false filters: log4j,wall,mergeStat keep-alive: false initial-size: 5 min-idle: 5 max-active: 20 time-between-eviction-runs-millis: 60000 min-evictable-idle-time-millis: 30000 ################### mybatis-plus配置 ################### mybatis-plus: mapper-locations: classpath*:mapping/**/*.xml type-aliases-package: com.gxzc.zen.api.bus.mapper,com.gxzc.zen.api.sys.mapper,com.gxzc.zen.api.bus.mapper,com.gxzc.zen.api.bus.mapper global-config: id-type: 0 #0:数据库ID自增 1:用户输入id 2:全局唯一id(IdWorker) 3:全局唯一ID(uuid) db-column-underline: true refresh-mapper: true logic-delete-value: 0 logic-not-delete-value: 1 sql-injector: com.baomidou.mybatisplus.mapper.LogicSqlInjector meta-object-handler: com.gxzc.zen.orm.CustomMetaObjectHandler configuration: map-underscore-to-camel-case: true cache-enabled: true #配置的缓存的全局开关 lazyLoadingEnabled: true #延时加载的开关 multipleResultSetsEnabled: true #延时加载一个属性时会加载该对象全部属性,否则按需加载属性 interceptors: com.baomidou.mybatisplus.plugins.OptimisticLockerInterceptor, com.baomidou.mybatisplus.plugins.PaginationInterceptor # log-impl: org.apache.ibatis.logging.stdout.StdOutImpl #打印sql语句,调试用 ##sharding-jdbc #sharding: # jdbc: # datasource: # names: ds_sys,ds_rec # ds_sys: # type: com.alibaba.druid.pool.DruidDataSource # driver-class-name: com.mysql.jdbc.Driver # url: jdbc:mysql://127.0.0.1:3306/archives_sys?useUnicode=true&characterEncoding=utf-8&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC&zeroDateTimeBehavior=convertToNull # username: root # password: root # maxActive: 20 # ds_rec: # type: com.alibaba.druid.pool.DruidDataSource # driver-class-name: com.mysql.jdbc.Driver # url: jdbc:mysql://127.0.0.1:3306/archives_rec?useUnicode=true&characterEncoding=utf-8&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC&zeroDateTimeBehavior=convertToNull # username: root # password: root # maxActive: 20 # config: # sharding: # tables: # sys_dept: # actualDataNodes: 'ds_sys # sys_dic: # sys_param: