application-prod.yaml 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. server:
  2. port: 8000
  3. servlet:
  4. context-path: /bailianAi
  5. encoding:
  6. enabled: true
  7. force: true
  8. charset: utf-8
  9. --- # 数据源配置
  10. #spring:
  11. # shardingsphere:
  12. # datasource:
  13. # names: ds1
  14. # ds1:
  15. # type: com.alibaba.druid.pool.DruidDataSource
  16. # driver-class-name: com.mysql.cj.jdbc.Driver
  17. # url: jdbc:mysql://localhost:3306/ddt?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
  18. # username: root
  19. # password: Aa@1230
  20. # sharding:
  21. # tables:
  22. # bl_wd_topological:
  23. # actual-data-nodes: ds1.bl_wd_topological_$->{1..2}
  24. # key-generator:
  25. # column: center_wd_id
  26. # type: SNOWFLAKE
  27. # table-strategy:
  28. # standard:
  29. # sharding-column: center_wd_id
  30. # precise-algorithm-class-name: com.benyun.core.utils.sharding.ConsistenceHashAlgorithm
  31. spring:
  32. main:
  33. allow-bean-definition-overriding: true
  34. datasource:
  35. type: com.zaxxer.hikari.HikariDataSource
  36. # 动态数据源文档 https://www.kancloud.cn/tracy5546/dynamic-datasource/content
  37. dynamic:
  38. # 性能分析插件(有性能损耗 不建议生产环境使用)
  39. p6spy: false
  40. # 设置默认的数据源或者数据源组,默认值即为 master
  41. primary: master
  42. # 严格模式 匹配不到数据源则报错
  43. strict: true
  44. datasource:
  45. # 主库数据源
  46. master:
  47. type: ${spring.datasource.type}
  48. driverClassName: com.mysql.cj.jdbc.Driver
  49. # jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
  50. # rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
  51. url: jdbc:mysql://192.168.2.64:3306/bailian-ai?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
  52. username: root
  53. password: benyun
  54. # 从库数据源
  55. slave:
  56. lazy: true
  57. type: ${spring.datasource.type}
  58. driverClassName: com.mysql.cj.jdbc.Driver
  59. url: jdbc:mysql://192.168.2.64:3306/bailian-ai?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
  60. username: root
  61. password: benyun
  62. # oracle:
  63. # type: ${spring.datasource.type}
  64. # driverClassName: oracle.jdbc.OracleDriver
  65. # url: jdbc:oracle:thin:@//localhost:1521/XE
  66. # username: ROOT
  67. # password: root
  68. # hikari:
  69. # connectionTestQuery: SELECT 1 FROM DUAL
  70. # postgres:
  71. # type: ${spring.datasource.type}
  72. # driverClassName: org.postgresql.Driver
  73. # url: jdbc:postgresql://localhost:5432/postgres?useUnicode=true&characterEncoding=utf8&useSSL=true&autoReconnect=true&reWriteBatchedInserts=true
  74. # username: root
  75. # password: root
  76. # sqlserver:
  77. # type: ${spring.datasource.type}
  78. # driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver
  79. # url: jdbc:sqlserver://localhost:1433;DatabaseName=tempdb;SelectMethod=cursor;encrypt=false;rewriteBatchedStatements=true
  80. # username: SA
  81. # password: root
  82. hikari:
  83. # 最大连接池数量
  84. maxPoolSize: 20
  85. # 最小空闲线程数量
  86. minIdle: 10
  87. # 配置获取连接等待超时的时间
  88. connectionTimeout: 30000
  89. # 校验超时时间
  90. validationTimeout: 5000
  91. # 空闲连接存活最大时间,默认10分钟
  92. idleTimeout: 600000
  93. # 此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认30分钟
  94. maxLifetime: 1800000
  95. # 连接测试query(配置检测连接是否有效)
  96. connectionTestQuery: SELECT 1
  97. # 多久检查一次连接的活性
  98. keepaliveTime: 30000
  99. shardingsphere:
  100. datasource:
  101. names: ds1
  102. ds1:
  103. type: com.zaxxer.hikari.HikariDataSource
  104. driver-class-name: com.mysql.cj.jdbc.Driver
  105. jdbcUrl: jdbc:mysql://192.168.2.64:3306/bailian-ai?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
  106. username: root
  107. password: benyun
  108. sharding:
  109. tables:
  110. bl_wd_topological:
  111. actual-data-nodes: ds1.bl_wd_topological_$->{1..10}
  112. key-generator:
  113. column: center_wd_id
  114. type: SNOWFLAKE
  115. table-strategy:
  116. standard:
  117. sharding-column: center_wd_id
  118. precise-algorithm-class-name: com.benyun.core.utils.sharding.ConsistenceHashAlgorithm
  119. bl_topological_store_wd_list:
  120. actual-data-nodes: ds1.bl_topological_store_wd_list_$->{1..5}
  121. key-generator:
  122. column: center_wd_id
  123. type: SNOWFLAKE
  124. table-strategy:
  125. standard:
  126. sharding-column: center_wd_id
  127. precise-algorithm-class-name: com.benyun.core.utils.sharding.ConsistenceHashAlgorithm
  128. bl_topological_house_wd_list:
  129. actual-data-nodes: ds1.bl_topological_house_wd_list_$->{1..5}
  130. key-generator:
  131. column: center_wd_id
  132. type: SNOWFLAKE
  133. table-strategy:
  134. standard:
  135. sharding-column: center_wd_id
  136. precise-algorithm-class-name: com.benyun.core.utils.sharding.ConsistenceHashAlgorithm
  137. bl_topological_building_wd_list:
  138. actual-data-nodes: ds1.bl_topological_building_wd_list_$->{1..5}
  139. key-generator:
  140. column: center_wd_id
  141. type: SNOWFLAKE
  142. table-strategy:
  143. standard:
  144. sharding-column: center_wd_id
  145. precise-algorithm-class-name: com.benyun.core.utils.sharding.ConsistenceHashAlgorithm
  146. redis: #redis配置
  147. host: 192.168.2.64 #redis服务地址
  148. database: 11
  149. port: 6379 #redis连接端口
  150. timeout: 5000ms #连接超时时间
  151. password: "123456"
  152. pool:
  153. minIdle: 1 #连接池中的最小空闲连接
  154. maxIdle: 10 #连接池中的最大空闲连接
  155. maxWait: 3 #连接池最大阻塞等待时间(使用负值表示没有限制)
  156. maxActive: 8 #连接池最大连接数(使用赋值表示没有限制)
  157. #mybatis-plus配置
  158. mybatis-plus:
  159. mapper-locations: classpath:/mapper/**/*.xml #告诉mybatis数据库映射文件mapper.xml的位置
  160. # configuration:
  161. # log-impl: org.apache.ibatis.logging.stdout.StdOutImpl #显示sql日志
  162. global-config:
  163. db-config:
  164. id-type: auto
  165. pagehelper:
  166. helper-dialect: mysql
  167. reasonable: true
  168. support-methods-arguments: true
  169. params: count=countSql