server: port: 8082 servlet: context-path: /universaltestsoftware_server_api encoding: force: true charset: UTF-8 enabled: true tomcat: uri-encoding: UTF-8 logging: level: web: trace #数据源连接信息 spring: #放开springmvc对静态资源的拦截 mvc: static-path-pattern: /static/** servlet: multipart: enabled: true max-file-size: 300MB max-request-size: 2048MB datasource: url: jdbc:mysql://127.0.0.1:3306/universaltestsoftware_server_api?characterEncoding=utf-8 username: root password: driver-class-name: com.mysql.cj.jdbc.Driver druid: keep-alive: true initial-size: 5 #初始化连接大小 min-idle: 5 #最小连接池数量 max-active: 20 #最大连接池数量 max-wait: 30000 #获取连接时最大等待时间,单位毫秒 time-between-eviction-runs-millis: 30000 #配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 min-evictable-idle-time-millis: 30000 #配置一个连接在池中最小生存的时间,单位是毫秒 validation-query: SELECT 1 #测试连接 test-while-idle: true #申请连接的时候检测,建议配置为true,不影响性能,并且保证安全性 test-on-borrow: false #获取连接时执行检测,建议关闭,影响性能 test-on-return: false #归还连接时执行检测,建议关闭,影响性能 pool-prepared-statements: false #是否开启PSCache,PSCache对支持游标的数据库性能提升巨大,oracle建议开启,mysql下建议关闭 max-pool-prepared-statement-per-connection-size: 20 #开启poolPreparedStatements后生效 filters: stat,wall #配置扩展插件,常用的插件有=>stat:监控统计 wall:防御sql注入 connection-properties: 'druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000'#通过connectProperties属性来打开mergeSql功能;慢SQL记录 cbsd: uploadfilesrootpath: "c:/gs/chongtongguanwang_api/projectFiles/" # Netty TCP服务器端口 netty: tcp: port: 8083