springboot之application.yml配置文件

spring:
  devtools:
    restart:
      # 需要实时更新的目录
      additional-paths: resources/**,static/**,templates/**
  profiles:
    active: dev
  datasource:
    # driver-class-name: com.mysql.cj.jdbc.Driver 
    driver-class-name: com.mysql.jdbc.Driver 
    url: jdbc:mysql://ip:port/database?characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai
    username: root
    password: 123456
    platform: all
    type: com.alibaba.druid.pool.DruidDataSource
    druid:
      # 初始化大小,最小,最大
      initialSize: 1
      min-idle: 5
      maxActive: 20
      # 配置获取连接等待超时的时间
      maxWait: 60000
      # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
      timeBetweenEvictionRunsMillis: 60000
      # 配置一个连接在池中最小生存的时间,单位是毫秒
      minEvictableIdleTimeMillis: 30000
      validationQuery: select 'x'
      testWhileIdle: true
      testOnBorrow: false
      testOnReturn: false
      # 打开PSCache,并且指定每个连接上PSCache的大小
      pool-prepared-statements: true
      maxPoolPreparedStatementPerConnectionSize: 20
      filter:
        stat:
          enabled: true
          db-type: mysql
          log-slow-sql: true
          slow-sql-millis: 2000
          merge-sql: true
        wall:
          enabled: true
          db-type: mysql
          config:
            delete-allow: true
            drop-table-allow: true
            multi-statement-allow: true
        slf4j:
          enabled: true

mybatis:
  type-aliases-package: com.sxbang.test.model
  mapper-locations: classpath:/mybatis-mapper/*
  configuration:
    map-underscore-to-camel-case: true

logging:
  path: F:/logs

api-url: /api


你可能感兴趣的:(框架学习)