application-test.yml 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. server:
  2. port: 80
  3. canal:
  4. open: true
  5. ## spring jdbc配置
  6. spring:
  7. flyway:
  8. sql-migration-separator: _ #分隔符
  9. clean-disabled: true #禁用clean操作
  10. enabled: true #使flyway生效
  11. baseline-on-migrate: true #初始化时如果不存在迁移记录表,默认新建一个
  12. out-of-order: true #防止开发环境下漏掉没来得及apply的文件,产品环境最好设为false
  13. ignore-ignored-migrations: true
  14. locations: classpath:/db
  15. url: jdbc:mysql://127.0.0.1:3306/education?createDatabaseIfNotExist=true&useUnicode=true&characterEncoding=utf8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&useSSL=false&allowMultiQueries=true
  16. user: root
  17. password: 123456
  18. redis:
  19. jedis:
  20. pool:
  21. max-active: 8
  22. max-wait: 30
  23. max-idle: 8
  24. min-idle: 0
  25. host: 127.0.0.1
  26. port: 6379
  27. password: taoge
  28. rabbitmq:
  29. host: 127.0.0.1
  30. port: 5672
  31. username: rabbitmq
  32. password: 123456
  33. virtual-host: /
  34. publisher-returns: true
  35. listener:
  36. simple:
  37. acknowledge-mode: manual #开启手动确认模式
  38. publisher-confirm-type: correlated
  39. freemarker:
  40. template-loader-path: classpath:/template/
  41. suffix: .ftl
  42. charset: utf-8
  43. ## 文件上传大小限制
  44. servlet:
  45. multipart:
  46. max-file-size: 500MB
  47. max-request-size: 500MB
  48. mail:
  49. host: smtp.163.com
  50. port: 25
  51. username: 18296640717@163.com
  52. password: KIZMPBYPLMWTIZGP
  53. properties:
  54. mail:
  55. #表示开启 DEBUG 模式,这样,邮件发送过程的日志会在控制台打印出来,方便排查错误
  56. debug: true
  57. lbs:
  58. key: MYOBZ-OOEW3-KYC3G-YWDXA-DMQJ6-SPBMH
  59. ## 虚拟文件上传路径
  60. file:
  61. uploadPath: /root/uploads/
  62. ueditor:
  63. configFileName: config-dev.json
  64. # 微信公众号配置
  65. weChat:
  66. appId: wxc5d3bf3c1fbf6d25
  67. token: education
  68. appSecret: cf05150f801935391f29d73695f04300
  69. logging:
  70. file:
  71. path: /root/jar
  72. name: education.log
  73. #rabbitmq 队列配置
  74. rabbitmq:
  75. socket:
  76. queue: test_socket_queue
  77. routing-key: test_socket_queue_routing_key
  78. direct-exchange: test_socket_direct_exchange
  79. exam:
  80. queue: test_exam_queue
  81. routing-key: test_exam_queue_routing_key
  82. direct-exchange: test_exam_direct_exchange
  83. canal:
  84. queue: test_canal_queue
  85. routing-key: test_canal_queue_routing_key
  86. direct-exchange: test_canal_direct_exchange
  87. # sharding jdbc 读写分离配置
  88. sharding:
  89. jdbc:
  90. datasource:
  91. names: educationmaster,educationslave
  92. educationmaster:
  93. type: com.zaxxer.hikari.HikariDataSource
  94. jdbc-url: jdbc:mysql://127.0.0.1:3306/education?createDatabaseIfNotExist=true&useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true&serverTimezone=GMT%2B8
  95. driver-class-name: com.mysql.cj.jdbc.Driver
  96. username: root
  97. password: 123456
  98. educationslave:
  99. type: com.zaxxer.hikari.HikariDataSource
  100. jdbc-url: jdbc:mysql://127.0.0.1:3307/education?createDatabaseIfNotExist=true&useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true&serverTimezone=GMT%2B8
  101. driver-class-name: com.mysql.cj.jdbc.Driver
  102. username: root
  103. password: 123456
  104. config:
  105. masterslave: # 配置读写分离
  106. load-balance-algorithm-type: round_robin # 配置从库选择策略,提供轮询与随机,这里选择用轮询//random 随机 //round_robin 轮询
  107. name: db1s2
  108. master-data-source-name: educationmaster
  109. slave-data-source-names: educationslave
  110. props:
  111. sql:
  112. show: true