Files
javamemories/src/main/resources/application.yml
2026-03-02 15:27:52 +08:00

24 lines
958 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
server:
port: 9090
spring:
data:
redis:
port: 6379
password: ""
database: 0
timeout: 10000
datasource:
# 连接 URL关键test_db 是你要连接的数据库名,需提前创建)
url: jdbc:mysql://rm-f8z6oc5a03331500p8o.mysql.rds.aliyuncs.com:3306/test?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
# 数据库用户名
username: root
# 数据库密码(替换为你的 MySQL 密码)
password: Root123456
# 驱动类名MySQL 8.x 用这个5.x 改为 com.mysql.jdbc.Driver
driver-class-name: com.mysql.cj.jdbc.Driver
# 连接池配置(可选,提升性能)
hikari:
maximum-pool-size: 10 # 最大连接数
minimum-idle: 2 # 最小空闲连接数
idle-timeout: 60000 # 空闲连接超时时间(毫秒)
connection-timeout: 30000 # 连接超时时间(毫秒)