application-mysql.yml 1.8 KB
Newer Older
s_guodong committed
1 2 3
server:
  port: 8088
  servlet:
s_guodong committed
4
    #context-path: /gjjs/business
5
  servlet-path : /gjjs/business
s_guodong committed
6
spring:
s_guodong committed
7
  ipsnew:
8 9 10 11
    driver-class-name: com.mysql.cj.jdbc.Driver
    url: jdbc:mysql://192.168.0.110:3306/ips?useUnicode=true&characterEncoding=utf8
    username: ips
    password: ips
s_guodong committed
12 13 14 15 16 17 18 19 20 21 22 23 24 25
    type: com.alibaba.druid.pool.DruidDataSource
    # 下面为连接池的补充设置,应用到上面所有数据源中
    # 初始化大小,最小,最大
    # druid 配置: https://github.com/alibaba/druid/wiki/
    #初始化链接数
    initialSize: 1
    minIdle: 1
    maxActive: 20
    # 配置获取连接等待超时的时间
    maxWait: 60000
    # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
    timeBetweenEvictionRunsMillis: 60000
    # 配置一个连接在池中最小生存的时间,单位是毫秒
    minEvictableIdleTimeMillis: 300000
s_guodong committed
26
    # validationQuery: select 1 from dual
s_guodong committed
27 28 29 30 31 32 33 34 35 36 37 38 39
    testWhileIdle: true
    testOnBorrow: false
    testOnReturn: false
    # 打开PSCache,并且指定每个连接上PSCache的大小
    poolPreparedStatements: true
    maxPoolPreparedStatementPerConnectionSize: 20
    # 配置监控统计拦截的filters,stat用于监控界面,'wall'用于防火墙防御sql注入, slf4j用于druid记录sql日志
    filters: stat,slf4j
    #,wall
    # 通过connectProperties属性来打开mergeSql功能;慢SQL记录
    connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
    # 合并多个DruidDataSource的监控数据
    useGlobalDataSourceStat: false
s_guodong committed
40 41 42 43 44
  redis:
    host: 127.0.0.1
    database: 0
    port: 6379
    password:
s_guodong committed
45 46 47 48 49





s_guodong committed
50
envConfig:
s_guodong committed
51 52 53 54 55 56 57
  rootPath: workRoot
  cache:
    #缓存类型(guava/redis)
    type: redis
    #缓存失效时间(秒)
    expireAfterAccess: 3600
    #序列化方式
s_guodong committed
58 59 60
    serializer: kryo