application.properties

jpa




# 数据库
spring.datasource.url=jdbc:postgresql://192.168.1.123:5432/reamword
spring.datasource.username=postgres
spring.datasource.password=
spring.datasource.driver-class-name=org.postgresql.Driver

# jpa
spring.jpa.open-in-view=false
spring.jpa.hibernate.ddl-auto=none
## jpa属性
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect

### 调试用的,一起用
spring.jpa.properties.hibernate.show-sql=true
spring.jpa.properties.hibernate.format_sql=true
#### 使用 /* 减少sql字段
spring.jpa.properties.hibernate.use_sql_comments=true

### 统计
spring.jpa.properties.hibernate.generate_statistics=true

### 二级缓存
spring.jpa.properties.hibernate.cache.use_second_level_cache=true
spring.jpa.properties.hibernate.cache.use_query_cache=true
spring.jpa.properties.hibernate.cache.region.factory_class=org.hibernate.cache.jcache.JCacheRegionFactory


####  意思是我们需要配置hibernate.javax.cache.missing_cache_strategy=create,
# 表示如果没有在配置文件中配置缓存,将会自动创建,这里的配置文件是hazelcast.xml,
# 但是这里我们并没有这个文件,hazelcast会自动读取默认的一份配置文件,
# 在hazelcast的jar包中有hazelcast-default.xml文件,记录了默认配置,
# 要自定义配置时,复制一份,重命名为hazelcast.xml,放到resources目录下,会自动读到
#路径配置spring.hazelcast.config=classpath:hazelcast.xml    可以不用配置
spring.jpa.properties.hibernate.javax.cache.missing_cache_strategy=create

#### 缓存策略  @javax.persistence.Cacheable 的会被缓存到EhcacheManager
spring.jpa.properties.javax.persistence.sharedCache.mode=ENABLE_SELECTIVE

# log
logging.level.sql=DEBUG
logging.level.root=info
#logging.level.com.heliteq.his.homepage.repository.mapper.TestMapper=debug
logging.level.org.hibernate.type.descriptor.sql.BasicBinder=trace
logging.level.org.hibernate.type.descriptor.sql.BasicExtractor=trace
logging.level.org.hibernate.engine.QueryParameters=debug
logging.level.org.hibernate.engine.query.HQLQueryPlan=debug
server.port=8080

mybatis

spring.datasource.url=jdbc:sqlite:dev.db
spring.datasource.driver-class-name=org.sqlite.JDBC
spring.datasource.username=
spring.datasource.password=
spring.jackson.deserialization.UNWRAP_ROOT_VALUE=true


image.default=https://static.productionready.io/images/smiley-cyrus.jpg
jwt.secret=nRvyYC4soFxBdZ-F-5Nnzz5USXstR1YylsTd-mA0aKtI9HUlriGrtkf-TiuDapkLiUCogO3JOK7kwZisrHp6wA
jwt.sessionTime=86400

mybatis.configuration.cache-enabled=true
mybatis.configuration.default-statement-timeout=3000
mybatis.configuration.map-underscore-to-camel-case=true
mybatis.configuration.use-generated-keys=true
mybatis.type-handlers-package=io.spring.infrastructure.mybatis
mybatis.mapper-locations=mapper/*.xml
logging.level.io.spring.infrastructure.mybatis.readservice.ArticleReadService=DEBUG
logging.level.io.spring.infrastructure.mybatis.mapper=DEBUG
# Uncomment the following line to enable and allow access to the h2-console
#spring.h2.console.enabled=true

你可能感兴趣的:(application.properties)