55 lines
1.9 KiB
Properties
55 lines
1.9 KiB
Properties
server.port = 6810
|
|
|
|
## 数据源配置
|
|
#spring.datasource.url = jdbc:postgresql://localhost:5432/data_model
|
|
#spring.datasource.userName = postgres
|
|
#spring.datasource.password = 123456
|
|
#spring.datasource.driverClassName = org.postgresql.Driver
|
|
|
|
spring.datasource.url = jdbc:mysql://118.24.27.47:3306/data_model?useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
|
|
spring.datasource.userName = sxy
|
|
spring.datasource.password = sxy123
|
|
spring.datasource.driverClassName = com.mysql.cj.jdbc.Driver
|
|
|
|
server.tomcat.uri-encoding=UTF-8
|
|
|
|
# jackson 配置
|
|
spring.jackson.serialization.write-date-keys-as-timestamps=false
|
|
|
|
## Hikari连接池设置
|
|
spring.datasource.hikari.auto-commit = true
|
|
spring.datasource.hikari.maximum-pool-size = 100
|
|
spring.datasource.hikari.idle-timeout = 10000
|
|
spring.datasource.hikari.minimum-idle = 5
|
|
spring.datasource.hikari.validation-timeout = 3000
|
|
|
|
## Spring Data JPA 配置
|
|
spring.jpa.database = mysql
|
|
spring.jpa.database-platform = org.hibernate.dialect.MySQL5InnoDBDialect
|
|
spring.jpa.show-sql = false
|
|
# 指定 ddl mode (none, validate, create, create-drop, update)
|
|
spring.jpa.hibernate.ddl-auto = update
|
|
# 命名策略
|
|
spring.jpa.hibernate.naming-strategy = org.hibernate.cfg.ImprovedNamingStrategy
|
|
#spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.PostgreSQL95Dialect
|
|
#spring.jpa.properties.hibernate.dialect = org.hibernate.spatial.dialect.postgis.PostgisDialect
|
|
spring.jpa.properties.hibernate.temp.use_jdbc_metadata_defaults = false
|
|
|
|
## Devtools配置
|
|
spring.devtools.livereload.enabled = true
|
|
|
|
## 多国语言配置
|
|
spring.messages.basename = i18n/messages
|
|
spring.messages.encoding = UTF-8
|
|
|
|
# 上传文件配置
|
|
spring.servlet.multipart.enabled=true
|
|
# 最大文件大小
|
|
spring.servlet.multipart.max-file-size = 100MB
|
|
# 最大请求大小
|
|
spring.servlet.multipart.max-request-size = 100MB
|
|
|
|
spring.main.allow-bean-definition-overriding = true
|
|
|
|
|