server: port: 80 canal: open: true ## spring jdbc配置 spring: flyway: sql-migration-separator: _ #分隔符 clean-disabled: true #禁用clean操作 enabled: true #使flyway生效 baseline-on-migrate: true #初始化时如果不存在迁移记录表,默认新建一个 out-of-order: true #防止开发环境下漏掉没来得及apply的文件,产品环境最好设为false ignore-ignored-migrations: true locations: classpath:/db 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 user: root password: 123456 redis: jedis: pool: max-active: 8 max-wait: 30 max-idle: 8 min-idle: 0 host: 127.0.0.1 port: 6379 password: taoge rabbitmq: host: 127.0.0.1 port: 5672 username: rabbitmq password: 123456 virtual-host: / publisher-returns: true listener: simple: acknowledge-mode: manual #开启手动确认模式 publisher-confirm-type: correlated freemarker: template-loader-path: classpath:/template/ suffix: .ftl charset: utf-8 ## 文件上传大小限制 servlet: multipart: max-file-size: 500MB max-request-size: 500MB mail: host: smtp.163.com port: 25 username: 18296640717@163.com password: KIZMPBYPLMWTIZGP properties: mail: #表示开启 DEBUG 模式,这样,邮件发送过程的日志会在控制台打印出来,方便排查错误 debug: true lbs: key: MYOBZ-OOEW3-KYC3G-YWDXA-DMQJ6-SPBMH ## 虚拟文件上传路径 file: uploadPath: /root/uploads/ ueditor: configFileName: config-dev.json # 微信公众号配置 weChat: appId: wxc5d3bf3c1fbf6d25 token: education appSecret: cf05150f801935391f29d73695f04300 logging: file: path: /root/jar name: education.log #rabbitmq 队列配置 rabbitmq: socket: queue: test_socket_queue routing-key: test_socket_queue_routing_key direct-exchange: test_socket_direct_exchange exam: queue: test_exam_queue routing-key: test_exam_queue_routing_key direct-exchange: test_exam_direct_exchange canal: queue: test_canal_queue routing-key: test_canal_queue_routing_key direct-exchange: test_canal_direct_exchange # sharding jdbc 读写分离配置 sharding: jdbc: datasource: names: educationmaster,educationslave educationmaster: type: com.zaxxer.hikari.HikariDataSource 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 driver-class-name: com.mysql.cj.jdbc.Driver username: root password: 123456 educationslave: type: com.zaxxer.hikari.HikariDataSource 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 driver-class-name: com.mysql.cj.jdbc.Driver username: root password: 123456 config: masterslave: # 配置读写分离 load-balance-algorithm-type: round_robin # 配置从库选择策略,提供轮询与随机,这里选择用轮询//random 随机 //round_robin 轮询 name: db1s2 master-data-source-name: educationmaster slave-data-source-names: educationslave props: sql: show: true