Files
my-springboot-project/target/classes/application-prod.yml
2026-06-09 13:45:35 +08:00

105 lines
2.3 KiB
YAML

server:
port: 8080
servlet:
context-path: /api
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://${DB_HOST:mysql}:3306/knowledge_management_system?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
username: ${DB_USERNAME:root}
password: ${DB_PASSWORD:123456}
servlet:
multipart:
enabled: true
max-file-size: 500MB
max-request-size: 500MB
file-size-threshold: 2KB
jackson:
date-format: yyyy-MM-dd HH:mm:ss
time-zone: GMT+8
data:
redis:
host: ${REDIS_HOST:redis}
port: ${REDIS_PORT:6379}
password: ${REDIS_PASSWORD:}
database: 0
timeout: 3000ms
lettuce:
pool:
max-active: 8
max-idle: 8
min-idle: 0
max-wait: -1ms
springdoc:
api-docs:
enabled: ${SWAGGER_ENABLED:true}
path: /v3/api-docs
swagger-ui:
enabled: ${SWAGGER_ENABLED:true}
path: /swagger-ui.html
tags-sorter: alpha
operations-sorter: alpha
group-configs:
- group: 'default'
paths-to-match: '/**'
packages-to-scan: top.tqx.demo_1.controller
mybatis-plus:
mapper-locations: classpath*:mapper/**/*.xml
type-aliases-package: top.tqx.demo_1.entity
global-config:
db-config:
id-type: auto
logic-delete-value: 1
logic-not-delete-value: 0
configuration:
map-underscore-to-camel-case: true
cache-enabled: true
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
jwt:
secret: ${JWT_SECRET:your-secret-key-for-jwt-token-generation-2024-change-in-production}
expiration: 7200000
header: Authorization
prefix: Bearer
ai:
api:
host: ${AI_HOST:localhost}
port: ${AI_PORT:5001}
file:
upload:
path: /app/uploads/
url-prefix: /files/
allowed-extensions:
- .doc
- .docx
- .pdf
- .txt
- .jpg
- .jpeg
- .png
- .gif
- .webp
max-size: 524288000
x-key: ${X_KEY:password123}
cors:
allowed-origins: ${CORS_ALLOWED_ORIGINS:*}
logging:
level:
top.tqx.demo_1: INFO
org.springframework.security: WARN
pattern:
console: "%d{yyyy-MM-dd HH:mm:ss} - %msg%n"
file: "%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n"
file:
name: /app/logs/file-management-system.log
max-size: 10MB
max-history: 30