application-orm.yml 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. #spring:
  2. # datasource:
  3. # type: com.alibaba.druid.pool.DruidDataSource
  4. ################### mybatis-plus配置 ###################
  5. mybatis-plus:
  6. mapper-locations: classpath*:mapping/**/*.xml
  7. # type-aliases-package: com.gxzc.zen.api.bus.mapper,com.gxzc.zen.api.sys.mapper #,com.gxzc.zen.api.useage.mapper
  8. global-config:
  9. id-type: 0 #0:数据库ID自增 1:用户输入id 2:全局唯一id(IdWorker) 3:全局唯一ID(uuid)
  10. db-column-underline: true
  11. refresh-mapper: true
  12. logic-delete-value: 0
  13. logic-not-delete-value: 1
  14. sql-injector: com.baomidou.mybatisplus.mapper.LogicSqlInjector
  15. configuration:
  16. map-underscore-to-camel-case: true
  17. cache-enabled: true #配置的缓存的全局开关
  18. lazyLoadingEnabled: true #延时加载的开关
  19. multipleResultSetsEnabled: true #延时加载一个属性时会加载该对象全部属性,否则按需加载属性
  20. interceptors: com.baomidou.mybatisplus.plugins.OptimisticLockerInterceptor
  21. #log-impl: org.apache.ibatis.logging.stdout.StdOutImpl #打印sql语句,调试用
  22. ################## Alibaba Druid 配置 ##################
  23. spring:
  24. datasource:
  25. druid:
  26. stat-view-servlet:
  27. enabled: true
  28. login-username: root
  29. login-password: root
  30. reset-enable: false
  31. datasource:
  32. sys:
  33. mapper-location: classpath:mapping/sys/*.xml
  34. name: archives_sys
  35. 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
  36. username: root
  37. password: root
  38. testWhileIdle: true
  39. testOnBorrow: false
  40. testOnReturn: false
  41. validationQuery: SELECT 1
  42. asyncInit: false # 异步初始化
  43. filters: log4j,wall,mergeStat
  44. keepAlive: false
  45. driver-class-name: com.mysql.jdbc.Driver
  46. initialize: false #指定初始化数据源,是否用data.sql来初始化,默认: true
  47. initialSize: 5
  48. minIdle: 5
  49. maxActive: 20
  50. timeBetweenEvictionRunsMillis: 60000
  51. minEvictableIdleTimeMillis: 30000
  52. bus:
  53. mapper-location: classpath:mapping/bus/*.xml
  54. name: archives_rec
  55. 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
  56. username: root
  57. password: root
  58. testWhileIdle: true
  59. testOnBorrow: false
  60. testOnReturn: false
  61. validationQuery: SELECT 1
  62. asyncInit: false # 异步初始化
  63. filters: log4j,wall,mergeStat
  64. keepAlive: false
  65. driver-class-name: com.mysql.jdbc.Driver
  66. initialize: false #指定初始化数据源,是否用data.sql来初始化,默认: true
  67. initialSize: 5
  68. minIdle: 5
  69. maxActive: 20
  70. timeBetweenEvictionRunsMillis: 60000
  71. minEvictableIdleTimeMillis: 30000
  72. ##sharding-jdbc
  73. #sharding:
  74. # jdbc:
  75. # datasource:
  76. # names: ds_sys,ds_rec
  77. # ds_sys:
  78. # type: com.alibaba.druid.pool.DruidDataSource
  79. # driver-class-name: com.mysql.jdbc.Driver
  80. # 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
  81. # username: root
  82. # password: root
  83. # maxActive: 20
  84. # ds_rec:
  85. # type: com.alibaba.druid.pool.DruidDataSource
  86. # driver-class-name: com.mysql.jdbc.Driver
  87. # 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
  88. # username: root
  89. # password: root
  90. # maxActive: 20
  91. # config:
  92. # sharding:
  93. # tables:
  94. # sys_dept:
  95. # actualDataNodes: 'ds_sys
  96. # sys_dic:
  97. # sys_param: