application.yml&dev&redis
【application.yml】
server:
port: 7001
servlet:
context-path: /project
tomcat:
max-http-header-size: 8192
uri-encoding: UTF-8
spring:
profiles:
active: dev, redis
mvc:
static-path-pattern: /static/**
http:
multipart:
enabled: false
encoding:
force: true
charset: UTF-8
enabled: true
devtools:
livereload:
enabled: false # 關閉熱部署
mybatis:
mapper-locations: classpath:mapper/*.xml
type-aliases-package: com.project.domain
【application-dev.yml】
spring:
datasource:
url: jdbc:mysql://ip:port/project?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&autoReconnect=true&useSSL=false
username: username
password: password
type: com.zaxxer.hikari.HikariDataSource
hikari:
max-lifetime: 28830000
maximum-pool-size: 9
thymeleaf:
mode: HTML
encoding: UTF-8
servlet:
content-type: text/html
cache: false
prefix:
classpath: /templates
count:
daily:
path: E:\\...\\daily.txt
total:
path: E:\\...\\total.txt
total:
count:
time: 0 0 0 * * ?
ws:
webSocketUrl: ws://127.0.0.1:7001
wss:
webSocketUrl: wss://127.0.0.1:443
commonsThreadPool:
dequePoolSize: 2000 # 佇列大小
threadInSize: 6 # 入執行緒數
threadOutSize: 6 # 出執行緒數
threadDataSize: 12 # 執行緒同時執行數
inPoolLimitMillisecond: 3
init:
thread:
key1: value1
key2: value2
【application-redis.yml】
redis.host: ip
redis.port: port
redis.pass:
redis.timeout: 10000
redis.maxIdle: 300
redis.maxTotal: 600
redis.maxWaitMillis: 1000
redis.testOnBorrow: false