You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
60 lines
1.8 KiB
60 lines
1.8 KiB
server:
|
|
port: 12699 # 服务端口
|
|
forward-headers-strategy: native # 全局生效
|
|
spring:
|
|
# ========== 数据源配置 (MySQL) ==========
|
|
datasource:
|
|
url: jdbc:mysql://39.101.133.168:3306/link?useSSL=false&allowPublicKeyRetrieval=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
|
|
username: link
|
|
password: tEhdERkaGprEA7nT
|
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
|
hikari:
|
|
pool-name: LotteryHikariCP
|
|
maximum-pool-size: 10 # 连接池大小
|
|
connection-timeout: 30000
|
|
|
|
# ========== Redis 配置 ==========
|
|
# redis:
|
|
# host: 127.0.0.1
|
|
# port: 6379
|
|
# password: # 若无密码则留空
|
|
# database: 0 # 默认DB索引
|
|
# jedis:
|
|
# pool:
|
|
# max-active: 8 # 最大连接数
|
|
# max-wait: 5000ms # 最大等待时间
|
|
# max-idle: 4 # 最大空闲连接
|
|
# min-idle: 1 # 最小空闲连接
|
|
# timeout: 3000ms # 连接超时时间
|
|
|
|
|
|
# ========== MyBatis 配置(如果使用MyBatis代替JPA) ==========
|
|
mybatis:
|
|
mapper-locations: classpath:mapper/*.xml # XML映射文件路径
|
|
type-aliases-package: com.lottery.entity # 实体类包路径
|
|
configuration:
|
|
map-underscore-to-camel-case: true # 开启驼峰命名转换
|
|
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl # 打印SQL日志
|
|
|
|
logging:
|
|
config: classpath:logback-spring.xml
|
|
level:
|
|
root: INFO
|
|
org.springframework: WARN
|
|
com.link: INFO
|
|
|
|
# ========== 自定义配置(示例) ==========
|
|
lottery:
|
|
jwt:
|
|
#用户端JWT
|
|
user-secret-key: willier_need_at_least_32_chars_secure_key_12345
|
|
user-ttl: 7200000
|
|
user-token-name: authentication
|
|
|
|
max-draw-times: 3 # 用户每日最大抽奖次数
|
|
|
|
spring:
|
|
jackson:
|
|
date-format: yyyy-MM-dd HH:mm:ss
|
|
time-zone: GMT+8
|
|
|