This commit is contained in:
dairuoqi
2018-07-10 12:05:43 +08:00
commit 0d1b7d9364
15 changed files with 711 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
spring:
datasource:
url: jdbc:mysql://127.0.0.1:3306/geological
username: root
password: drq2028701
driver-class-name: com.mysql.jdbc.Driver
type: com.alibaba.druid.pool.DruidDataSource
testOnReturn: false
testOnBorrow: false
testWhileIdle: true
# 下面为连接池的补充设置,应用到上面所有数据源中
# 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
filters: stat, wall, log4j
dbcp2:
min-idle: 5
initial-size: 5
max-total: 5
max-wait-millis: 200
# 通过connectProperties属性来打开mergeSql功能;慢SQL记录
#connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
jpa:
hibernate:
# 实体类有更新时,数据库表更新
ddl-auto: update
show-sql: true
format_sql: true
database-platform: org.hibernate.dialect.MySQL5InnoDBDialect