application-prod.yml
1.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# 生产环境配置
spring:
# 数据源配置
datasource:
url: jdbc:mysql://${DB_HOST:localhost}:${DB_PORT:3306}/${DB_NAME:apple_erp}?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai&useSSL=true&allowPublicKeyRetrieval=false
username: ${DB_USERNAME:apple_erp}
password: ${DB_PASSWORD:MySQL@123}
druid:
# 生产环境使用更多连接数
initial-size: 10
min-idle: 10
max-active: 50
max-wait: 60000
# 生产环境关闭监控页面
stat-view-servlet:
enabled: false
# Redis配置
redis:
host: ${REDIS_HOST:localhost}
port: ${REDIS_PORT:6379}
password: ${REDIS_PASSWORD:}
database: ${REDIS_DATABASE:0}
# 生产环境开启缓存
cache:
type: redis
redis:
time-to-live: 3600000
# MyBatis Plus配置
mybatis-plus:
configuration:
# 生产环境不打印SQL
log-impl: org.apache.ibatis.logging.nologging.NoLoggingImpl
# 日志配置
logging:
level:
com.apple.erp: info
org.springframework.security: warn
org.springframework.web: warn
com.alibaba.druid: warn
file:
name: /app/logs/apple-erp.log
logback:
rollingpolicy:
max-file-size: 100MB
max-history: 30
total-size-cap: 1GB
# 自定义配置
apple:
erp:
# JWT配置
jwt:
secret: ${JWT_SECRET:apple-erp-jwt-secret-key-prod-2024}
expiration: ${JWT_EXPIRATION:86400}
refresh-expiration: ${JWT_REFRESH_EXPIRATION:604800}
# 文件上传配置
upload:
path: ${UPLOAD_PATH:/app/upload/}
allowed-types: jpg,jpeg,png,gif,pdf,doc,docx,xls,xlsx
max-size: 10
# 短信配置
sms:
aliyun:
access-key-id: ${SMS_ACCESS_KEY_ID:}
access-key-secret: ${SMS_ACCESS_KEY_SECRET:}
sign-name: ${SMS_SIGN_NAME:}
template-code: ${SMS_TEMPLATE_CODE:}
# 监控配置
management:
endpoints:
web:
exposure:
include: health,info,metrics
endpoint:
health:
show-details: when-authorized