34 lines
1.6 KiB
Properties
34 lines
1.6 KiB
Properties
spring.datasource.url = jdbc:mysql://localhost:3306/spring_tutorial?serverTimezone=UTC&useUnicode=true&characterEncoding=utf8&useSSL=false
|
|
spring.datasource.driver-class-name = com.mysql.cj.jdbc.Driver
|
|
spring.datasource.username = root
|
|
spring.datasource.password = root
|
|
# 强制每次启动使用 sql 初始化数据,本项目仅为了演示方便,真实环境应避免这种模式
|
|
spring.datasource.initialization-mode = ALWAYS
|
|
spring.datasource.schema = classpath:sql/schema.sql
|
|
spring.datasource.data = classpath:sql/data.sql
|
|
spring.redis.host = localhost
|
|
spring.redis.port = 6379
|
|
spring.redis.password =
|
|
spring.redis.database = 0
|
|
# Jetcache Config @ref https://github.com/alibaba/jetcache/wiki/Config_CN
|
|
jetcache.statIntervalMinutes = 15
|
|
jetcache.areaInCacheName = false
|
|
jetcache.hidePackages = com.alibaba
|
|
jetcache.local.default.type = caffeine
|
|
jetcache.local.default.limit = 100
|
|
jetcache.local.default.keyConvertor = fastjson
|
|
jetcache.local.default.expireAfterWriteInMillis = 100000
|
|
jetcache.local.otherArea.type = linkedhashmap
|
|
jetcache.local.otherArea.limit = 100
|
|
jetcache.local.otherArea.keyConvertor = none
|
|
jetcache.local.otherArea.expireAfterWriteInMillis = 100000
|
|
jetcache.remote.default.type = redis
|
|
jetcache.remote.default.keyConvertor = fastjson
|
|
jetcache.remote.default.valueEncoder = java
|
|
jetcache.remote.default.valueDecoder = java
|
|
jetcache.remote.default.poolConfig.minIdle = 5
|
|
jetcache.remote.default.poolConfig.maxIdle = 20
|
|
jetcache.remote.default.poolConfig.maxTotal = 50
|
|
jetcache.remote.default.host = ${spring.redis.host}
|
|
jetcache.remote.default.port = ${spring.redis.port}
|