diff --git a/data/xuan.mv.db b/data/xuan.mv.db index 7e217a5..b2a7841 100644 Binary files a/data/xuan.mv.db and b/data/xuan.mv.db differ diff --git a/pom.xml b/pom.xml index 40d0759..bf9b841 100644 --- a/pom.xml +++ b/pom.xml @@ -117,6 +117,13 @@ mysql-connector-java 8.0.33 + + + mysql + mysql-connector-java + 8.0.33 + + com.h2database diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index d9ee046..01059ce 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,30 +1,17 @@ server.port=8080 spring.application.name=xuan-utils-pro -# H2 Database Configuration (Development) -spring.datasource.url=jdbc:h2:file:./data/xuan;DB_CLOSE_ON_EXIT=FALSE;AUTO_RECONNECT=TRUE -spring.datasource.driverClassName=org.h2.Driver -spring.datasource.username=sa -spring.datasource.password= +# MySQL Database Configuration +spring.datasource.url=jdbc:mysql://localhost:3306/xuan_deduct?useSSL=false&serverTimezone=Asia/Shanghai&characterEncoding=utf8&allowPublicKeyRetrieval=true +spring.datasource.driverClassName=com.mysql.cj.jdbc.Driver +spring.datasource.username=xuan_user +spring.datasource.password=xuan_password # JPA Configuration -spring.jpa.database-platform=org.hibernate.dialect.H2Dialect +spring.jpa.database-platform=org.hibernate.dialect.MySQL8Dialect spring.jpa.hibernate.ddl-auto=update spring.jpa.show-sql=true spring.jpa.properties.hibernate.format_sql=true -# H2 Console (Development only) -spring.h2.console.enabled=true -spring.h2.console.path=/h2-console - -# MySQL Configuration (Production - uncomment when needed) -#spring.datasource.url=jdbc:mysql://localhost:3306/xuan_deduct?useSSL=false&serverTimezone=Asia/Shanghai&characterEncoding=utf8 -#spring.datasource.driverClassName=com.mysql.cj.jdbc.Driver -#spring.datasource.username=root -#spring.datasource.password=your_password -#spring.jpa.database-platform=org.hibernate.dialect.MySQL8Dialect -#spring.jpa.hibernate.ddl-auto=update - # Logging logging.level.xuan=DEBUG -logging.level.org.hibernate.SQL=DEBUG