
server:
  port: 18081
  tomcat:
    accesslog:
      enabled: true
      directory: /Users/mashengyi/Documents/MSY/WorkSpace/jkWorkSpace/logs   #日志存储目录
      pattern: '%t %a %A %m %U%q %s %D %I %B'  #日志格式
      prefix: access        #日志文件前缀
      rename-on-rotate: true #是否启用日志轮转
    max-threads: 800 # 最大线程数
    max-connections: 20000 # 最大链接数
    min-spare-threads: 100 # 最小空闲线程数
    accept-count: 200
spring:
  application:
    name: invoice
  servlet:
    multipart:
      enabled: true
      max-file-size: 200MB
      max-request-size: 200MB
  profiles:
    active: dev
  jpa:
    show-sql: true
  main:
    allow-bean-definition-overriding: true
  resources:
    static-locations: classpath:static/,file:static/
mybatis-plus:
  mapper-locations: classpath:/mapper/*Mapper.xml,classpath*:/mapper/*/*Mapper.xml
  global-config:
    db-config:
      table-prefix: t_
logging:
  config: classpath:logback-spring.xml
  path: d:/logs
---
spring:
  profiles: dev
  datasource:
    url: jdbc:mysql://192.168.50.4:3306/db_invoice?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&allowMultiQueries=true
    username: root
    password: jk@123
    driver-class-name: com.mysql.jdbc.Driver
    # \u4F7F\u7528druid\u6570\u636E\u6E90
    type: com.alibaba.druid.pool.DruidDataSource
    platform: mysql
    druid:
      initial-size: 10  # 初始化大小
      min-idle: 10  # 最小
      max-active: 100  # 最大
      max-wait: 60000  # 配置获取连接等待超时的时间
      time-between-eviction-runs-millis: 60000  # 配置间隔多久才进行一次检测，检测需要关闭的空闲连接，单位是毫秒
      min-evictable-idle-time-millis: 300000  # 指定一个空闲连接最少空闲多久后可被清除，单位是毫秒
      validationQuery: select 'x'
      test-while-idle: true  # 当连接空闲时，是否执行连接测试
      test-on-borrow: false  # 当从连接池借用连接时，是否测试该连接
      test-on-return: false  # 在连接归还到连接池时是否测试该连接
      filters: config,wall,stat  # 配置监控统计拦截的filters，去掉后监控界面sql无法统计，'wall'用于防火墙
      poolPreparedStatements: true # 打开PSCache，并且指定每个连接上PSCache的大小
      maxPoolPreparedStatementPerConnectionSize: 20
      maxOpenPreparedStatements: 20
      # 通过connectProperties属性来打开mergeSql功能；慢SQL记录
      connectionProperties: druid.stat.slowSqlMillis=200;druid.stat.logSlowSql=true;config.decrypt=false
  mail:
    host: smtp.qq.com #邮件发送服务器
    port: 587
    username: 862885632@qq.com
    password: axlmfkdxmixjbchh
    test-connection: true #测试连接
    properties:
      mail:
        smtp:
          auth: true
          enable: true
  redis:
    host: 127.0.0.1
    port: 6379
---
spring:
  profiles: prod
  datasource:
    url: jdbc:mysql://192.168.50.4:3306/db_invoice?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&allowMultiQueries=true
    username: root
    password: jk@123
    driver-class-name: com.mysql.jdbc.Driver
    type: com.alibaba.druid.pool.DruidDataSource
    platform: mysql
    druid:
      initial-size: 5  # 初始化大小
      min-idle: 5  # 最小
      max-active: 100  # 最大
      max-wait: 60000  # 配置获取连接等待超时的时间
      time-between-eviction-runs-millis: 60000  # 配置间隔多久才进行一次检测，检测需要关闭的空闲连接，单位是毫秒
      min-evictable-idle-time-millis: 300000  # 指定一个空闲连接最少空闲多久后可被清除，单位是毫秒
      validationQuery: select 'x'
      test-while-idle: true  # 当连接空闲时，是否执行连接测试
      test-on-borrow: false  # 当从连接池借用连接时，是否测试该连接
      test-on-return: false  # 在连接归还到连接池时是否测试该连接
      filters: config,wall,stat  # 配置监控统计拦截的filters，去掉后监控界面sql无法统计，'wall'用于防火墙
      poolPreparedStatements: true # 打开PSCache，并且指定每个连接上PSCache的大小
      maxPoolPreparedStatementPerConnectionSize: 20
      maxOpenPreparedStatements: 20
      # 通过connectProperties属性来打开mergeSql功能；慢SQL记录
      connectionProperties: druid.stat.slowSqlMillis=200;druid.stat.logSlowSql=true;config.decrypt=false
  mail:
        host: smtp.qq.com #邮件发送服务器
        port: 587
        username: 862885632@qq.com
        password: axlmfkdxmixjbchh
        test-connection: true #测试连接
        properties:
          mail:
            smtp:
              auth: true
              enable: true
  redis:
    host: 127.0.0.1
    port: 6379
    password: lq2uRBsf<vh2ouo

