chore: 更新配置文件及pom.xml编码设置
修改开发环境jwt注释格式 调整生产环境jpa ddl-auto为create 添加maven资源插件UTF-8编码配置
This commit is contained in:
9
pom.xml
9
pom.xml
@@ -129,6 +129,15 @@
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<!-- 添加资源编码配置 -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<version>3.3.1</version>
|
||||
<configuration>
|
||||
<encoding>UTF-8</encoding>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<!-- 确保项目编译和资源处理使用UTF-8编码 -->
|
||||
<sourceDirectory>src/main/java</sourceDirectory>
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user