From 505a7a0944a46f861111c2bd4ffc39461b9b7057 Mon Sep 17 00:00:00 2001 From: qingfeng1121 Date: Thu, 11 Dec 2025 14:48:15 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E6=9B=B4=E6=96=B0=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=8F=8Apom.xml=E7=BC=96=E7=A0=81=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改开发环境jwt注释格式 调整生产环境jpa ddl-auto为create 添加maven资源插件UTF-8编码配置 --- pom.xml | 9 +++++++++ src/main/resources/application-dev.properties | 3 ++- src/main/resources/application-prod.properties | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index a70779d..7f7a1fe 100644 --- a/pom.xml +++ b/pom.xml @@ -129,6 +129,15 @@ + + + org.apache.maven.plugins + maven-resources-plugin + 3.3.1 + + UTF-8 + + src/main/java diff --git a/src/main/resources/application-dev.properties b/src/main/resources/application-dev.properties index 1017710..d0d23ad 100644 --- a/src/main/resources/application-dev.properties +++ b/src/main/resources/application-dev.properties @@ -29,7 +29,8 @@ spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL8Dialect # JWT 配置 - 开发用(方便调试,密钥较短,过期时间短) # ==================================================================== jwt.secret=devSecretKey2024ForLocalDevelopment -jwt.expiration=3600000 # 1小时过期,方便调试 +jwt.expiration=3600000 +# 1小时过期,方便调试 jwt.header=Authorization jwt.token-prefix=Bearer diff --git a/src/main/resources/application-prod.properties b/src/main/resources/application-prod.properties index 6a87177..19d30bc 100644 --- a/src/main/resources/application-prod.properties +++ b/src/main/resources/application-prod.properties @@ -24,7 +24,7 @@ spring.datasource.hikari.connection-test-query=SELECT 1 spring.datasource.hikari.pool-name=WebProjectHikariCP # JPA配置(生产环境禁用自动DDL,避免意外修改表结构) -spring.jpa.hibernate.ddl-auto=none +spring.jpa.hibernate.ddl-auto=create spring.jpa.show-sql=false spring.jpa.properties.hibernate.format_sql=false spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL8Dialect