application.yml

application.yml

server:
  port: 8080

spring:
  profiles:
    active: dev
  datasource:
    name: test
    #erverTimezone=UTC UTC是统一标准世界时间
    url: jdbc:mysql://127.0.0.1:3306/database?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC
    username: root
    password: ***
    # 使用druid数据源
    # 连接池的配置信息
    # 初始化大小,最小,最大
    type: com.alibaba.druid.pool.DruidDataSource
    initialSize: 1
    minIdle: 1
    maxActive: 20
    # 配置获取连接等待超时的时间
    maxWait: 60000
    # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
    timeBetweenEvictionRunsMillis: 60000
    # 配置一个连接在池中最小生存的时间,单位是毫秒
    minEvictableIdleTimeMillis: 300000
    validationQuery: select 'x'
    testWhileIdle: true
    testOnBorrow: false
    testOnReturn: false
    # 打开PSCache,并且指定每个连接上PSCache的大小
    poolPreparedStatements: true
    maxOpenPreparedStatements: 20
    # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
    filters: stat,wall,log4j
    # 通过connectProperties属性来打开mergeSql功能;慢SQL记录
    connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
mybatis:
  # 默认从resources中查询
  mapper-locations: classpath:mapper/*.xml
  #type-aliases-package 它一般对应我们的实体类所在的包,这个时候会自动取对应包中不包括包名的简单类名作为包括包名的别名。
  #多个package之间可以用逗号或者分号等来进行分隔。(value的值一定要是包的全名)
  type-aliases-package: com.wld.entity

#pagehelper分页插件
pagehelper:
  helperDialect: mysql
  reasonable: true
  supportMethodsArguments: true
  params: count=countSql
posted @ 2019-04-09 21:41 嗯哼~ 阅读( ...) 评论( ...) 编辑 收藏

猜你喜欢

转载自blog.csdn.net/kuangjuelian229/article/details/89346808