0
点赞
收藏
分享

微信扫一扫

我爱java系列---【springboot+springcloud+zookeeper+mybatis的yml文件】

westfallon 2022-06-01 阅读 53

1.application.yml文件

server:
port: 8099
spring:
application:
name: dbproxy
cloud:
zookeeper:
connect-string: 10.8.18.193:2181
discovery:
enabled: true
register: true
instance-host: ${spring.cloud.client.ip-address}
#instance-host: 10.8.106.47

datasource:
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/sms2019?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf-8
username: root
password: 123456
initialSize: 5
maxWait: 60000
timeBetweenEvictionRunsMillis: 60000
minEvictableIdleTimeMillis: 300000
validationQuery: SELECT 1 FROM DUAL
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
poolPreparedStatements: true
connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
useGlobalDataSourceStat: true

# springboot整合mybatis
mybatis:
type-aliases-package: com.aspire.sms2019.model
mapper-locations: classpath:mapper/*.xml
config-location: classpath:config/mybatis.xml
pagehelper:
helper-dialect: mysql
reasonable: true
support-methods-arguments: true
row-bounds-with-count: true
logging:
level:
com:
aspire:
sms2019: debug
root: info

  

举报

相关推荐

0 条评论