spring boot项目完成

This commit is contained in:
2026-03-02 15:27:52 +08:00
parent 433f28f8f0
commit 2b6b0e1bb5
10 changed files with 238 additions and 28 deletions

View File

@@ -6,4 +6,19 @@ spring:
port: 6379
password: ""
database: 0
timeout: 10000
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 # 连接超时时间(毫秒)