add JWT properties

This commit is contained in:
myh 2023-12-10 22:49:19 +08:00
parent f82ed5c415
commit af0213bb4e
2 changed files with 29 additions and 23 deletions

View File

@ -8,6 +8,7 @@ spring.datasource.url=jdbc:sqlserver://106.54.219.245:1433;\
loginTimeout=30;
spring.datasource.username=myh
spring.datasource.password=20231103#MS_Sql
# JPA config
spring.jpa.hibernate.ddl-auto=none
spring.jpa.show-sql=true
@ -15,6 +16,11 @@ spring.jpa.properties.hibernate.format_sql=true
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.SQLServerDialect
spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
spring.jpa.properties.hibernate.enable_lazy_load_no_trans=true
spring.jpa.open-in-view=false
# spring security config
spring.security.user.name=anchor
spring.security.user.password=20172
# spring.security.user.name=anchor
# spring.security.user.password=20172
# Jwt default expiration time is 15 minutes
app.jwt-expiration-milliseconds = 900000

View File

@ -4,26 +4,26 @@
"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<!-- 连接数据库的基本参数 -->
<property name="hibernate.connection.driver_class">com.microsoft.sqlserver.jdbc.SQLServerDriver</property>
<property name="hibernate.connection.url">jdbc:sqlserver://intpointer.com:1433;\
databaseName=Elm;\
encrypt=true;\
trustServerCertificate=true;\
loginTimeout=30;
</property>
<property name="hibernate.connection.username">myh</property>
<property name="hibernate.connection.password">20231103#MS_Sql</property>
<!-- 配置Hibernate的方言 -->
<property name="hibernate.dialect">org.hibernate.dialect.SQLServerDialect</property>
<!-- &lt;!&ndash; 连接数据库的基本参数 &ndash;&gt;-->
<!-- <property name="hibernate.connection.driver_class">com.microsoft.sqlserver.jdbc.SQLServerDriver</property>-->
<!-- <property name="hibernate.connection.url">jdbc:sqlserver://intpointer.com:1433;\-->
<!-- databaseName=Elm;\-->
<!-- encrypt=true;\-->
<!-- trustServerCertificate=true;\-->
<!-- loginTimeout=30;-->
<!-- </property>-->
<!-- <property name="hibernate.connection.username">myh</property>-->
<!-- <property name="hibernate.connection.password">20231103#MS_Sql</property>-->
<!-- &lt;!&ndash; 配置Hibernate的方言 &ndash;&gt;-->
<!-- <property name="hibernate.dialect">org.hibernate.dialect.SQLServerDialect</property>-->
<!-- 可选配置================ -->
<!-- 打印SQL -->
<property name="hibernate.show_sql">true</property>
<!-- 格式化SQL -->
<property name="hibernate.format_sql">true</property>
<!-- 自动创建表 -->
<property name="hibernate.hbm2ddl.auto">update</property>
<!-- &lt;!&ndash; 可选配置================ &ndash;&gt;-->
<!-- &lt;!&ndash; 打印SQL &ndash;&gt;-->
<!-- <property name="hibernate.show_sql">true</property>-->
<!-- &lt;!&ndash; 格式化SQL &ndash;&gt;-->
<!-- <property name="hibernate.format_sql">true</property>-->
<!-- &lt;!&ndash; 自动创建表 &ndash;&gt;-->
<!-- <property name="hibernate.hbm2ddl.auto">update</property>-->
<!-- &lt;!&ndash; 配置C3P0连接池 &ndash;&gt;-->
<!-- <property name="connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property>-->
@ -45,7 +45,7 @@
<!-- 引入映射 -->
<!-- <mapping resource="com/itheima/hibernate/domain/Customer.hbm.xml"/>
<mapping resource="com/itheima/hibernate/domain/LinkMan.hbm.xml"/> -->
<!-- <mapping resource="./"/>-->
<!-- <mapping resource="./"/>-->
<!-- <mapping resource="./"/>-->
<!-- <mapping resource="./"/>-->
</session-factory>
</hibernate-configuration>