tomcat經常使用配置
mysql
server: tomcat: uri-encoding: UTF-8 threads: max: 200 min-spare: 30 connection-timeout: 5000ms port: 8888 servlet: context-path: /demo
mysql配置redis
spring: datasource: type: com.alibaba.druid.pool.DruidDataSource druid: driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://localhost:3306/emos?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai username: root password: root #cpu核數 initial-size: 8 #cpu核數 * 2 max-active: 16 min-idle: 8 max-wait: 60000 test-while-idle: true test-on-borrow: false test-on-return: false
redis配置spring
spring: redis: database: 0 host: localhost port: 6379 password: abc123456 jedis: pool: max-active: 1000 max-wait: -1ms max-idle: 16 min-idle: 8
mongodb配置sql
spring: data: mongodb: host: localhost port: 27017 database: emos authentication-database: admin username: admin password: abc123456
mybatis配置mongodb
mybatis: mapper-locations: classpath*:mapper/*.xml configuration: map-underscore-to-camel-case: true
日誌輸出配置tomcat
logging: level: root: info com.example.emos.wx.dao: warn