spring: ####### database Config ####### datasource: druid: connection-init-sqls: set names utf8mb4 driver-class-name: com.mysql.cj.jdbc.Driver type: com.alibaba.druid.pool.DruidDataSource url: jdbc:mysql://${ONEBLOG_DATASOURCE_HOST:127.0.0.1}:${ONEBLOG_DATASOURCE_PORT:3306}/${ONEBLOG_DATASOURCE_DATABASE_NAME:dblog}?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false&allowPublicKeyRetrieval=true&useLegacyDatetimeCode=false username: ${ONEBLOG_DATASOURCE_USERNAME:root} password: ${ONEBLOG_DATASOURCE_PASSWORD:root} ####### Redis Config ####### redis: database: ${ONEBLOG_REDIS_DATABASE_INDEX:1} # Redis服务器地址 host: ${ONEBLOG_REDIS_HOST:127.0.0.1} # Redis服务器连接端口 port: ${ONEBLOG_REDIS_PORT:6379} # Redis服务器连接密码(默认为空) password: ${ONEBLOG_REDIS_PASSWORD:123456ZHYD} jedis: pool: # 连接池最大连接数(使用负值表示没有限制) max-active: 8 # 连接池最大阻塞等待时间(使用负值表示没有限制) max-wait: -1ms # 连接池中的最大空闲连接 max-idle: 8 # 连接池中的最小空闲连接 min-idle: 0 # 连接超时时间(毫秒) timeout: 5000ms # 默认的数据过期时间,主要用于shiro权限管理 expire: 2592000 ####### redis缓存服务配置 ####### session: store-type: redis # 指定默认MimeMessage的编码,默认为: UTF-8 mail: default-encoding: UTF-8 # 指定SMTP server使用的协议,默认为: smtp protocol: smtp # 指定SMTP server host. host: ${ONEBLOG_MAIL_HOST:x} port: ${ONEBLOG_MAIL_PORT:465} # 指定SMTP server的用户名. username: ${ONEBLOG_MAIL_USERNAME:x} # 指定SMTP server登录密码: password: ${ONEBLOG_MAIL_PASSWORD:x} # 指定是否在启动时测试邮件服务器连接,默认为false test-connection: false properties: mail.smtp.auth: true # 腾讯企业邮箱 下两个配置必须!!! mail.smtp.ssl.enable: true mail.smtp.socketFactory.class: javax.net.ssl.SSLSocketFactory mail.smtp.socketFactory.port: 465 mail.smtp.starttls.enable: true mail.smtp.starttls.required: true mail.smtp.connectiontimeout: 50000 mail.smtp.timeout: 30000 mail.smtp.writetimeout: 50000 # MyBatis mybatis: type-aliases-package: com.zyd.blog.persistence.beans mapper-locations: classpath:/mybatis/*.xml configuration: default-enum-type-handler: org.apache.ibatis.type.EnumTypeHandler log-impl: org.apache.ibatis.logging.stdout.StdOutImpl # mapper mapper: mappers: - com.zyd.blog.plugin.BaseMapper not-empty: false identity: MYSQL use-simple-type: false enum-as-simple-type: true # pagehelper pagehelper: helper-dialect: mysql reasonable: true support-methods-arguments: true params: count=countSql app: version: v2.3.1 enableRedisCache: ${ONEBLOG_ENABLE_REDIS_CACHE:false}