1
0

feat: 增加mysql作为后端数据库

This commit is contained in:
2024-12-22 12:15:34 +08:00
parent 0052494ec5
commit afb87d0c12
2 changed files with 51 additions and 4 deletions

View File

@@ -3,12 +3,29 @@ server:
spring:
application:
name: bookstore
jpa:
hibernate:
ddl-auto: update
show-sql: true
---
spring:
config:
activate:
on-profile: h2
datasource:
url: jdbc:h2:file:./database;DB_CLOSE_ON_EXIT=FALSE
driver-class-name: org.h2.Driver
username: lanyuanxiaoyao
password: lanyuanxiaoyao
jpa:
hibernate:
ddl-auto: update
show-sql: true
---
spring:
config:
activate:
on-profile: mysql-local
datasource:
url: jdbc:mysql://192.168.31.127:3780/bookstore
driver-class-name: com.mysql.cj.jdbc.Driver
username: bookstore
password: EzSn+RZ*x2&fHFh9kC+H