Skip to content

Commit

Permalink
添加yml配置文件
Browse files Browse the repository at this point in the history
  • Loading branch information
suvvm committed Nov 12, 2019
1 parent 1af5f46 commit 8123c11
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions OnlineSurveyBackEnd/src/main/resources/application.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
spring:
datasource:
username: root
password: root
url: jdbc:mysql://localhost:3306/springmybatis?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8&useSSL=false&allowPublicKeyRetrieval=true
driver-class-name: com.mysql.cj.jdbc.Driver
type: com.alibaba.druid.pool.DruidDataSource

initialSize: 5
minIdle: 5
maxActive: 20
maxWait: 60000
timeBetweenEvictionRunsMillis: 300000
validationQuery: SELECT 1 FROM DUAL
testWhileIdle: true
testOnBorrow: false
poolPreparedStatements: true
# 配置监控统计拦截的filters,去掉后监控界面sql无法统计。‘wall’用于防火墙
filters: stat,wall,log4j
maxPoolPreparedStatementPerConnectionSize: 20
useGlobalDataSourceStat: true
connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=500

0 comments on commit 8123c11

Please sign in to comment.