application.yaml 3.9 KB
server:
  port: 8763

spring:
  application:
    name: auth-server
session:
  store-type: redis
  datasource:
    dynamic:
      enable: true
    druid:
      # JDBC 配置(驱动类自动从url的mysql识别,数据源类型自动识别)
      core:
        url: jdbc:mysql://localhost/oauth-center?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
        username: root
        password: root
        driver-class-name:  com.mysql.jdbc.Driver
      log:
        url: jdbc:mysql://59.110.164.254:3306/log-center?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
        username: root
        password: root
        driver-class-name:  com.mysql.jdbc.Driver
      #连接池配置(通常来说,只需要修改initialSize、minIdle、maxActive
      initial-size: 1
      max-active: 20
      min-idle: 1
      # 配置获取连接等待超时的时间
      max-wait: 60000
      #打开PSCache,并且指定每个连接上PSCache的大小
      pool-prepared-statements: true
      max-pool-prepared-statement-per-connection-size: 20
      validation-query: SELECT 'x'
      test-on-borrow: false
      test-on-return: false
      test-while-idle: true
      #配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
      time-between-eviction-runs-millis: 60000
      #配置一个连接在池中最小生存的时间,单位是毫秒
      min-evictable-idle-time-millis: 300000
      filters: stat,wall
      # WebStatFilter配置,说明请参考Druid Wiki,配置_配置WebStatFilter
      #是否启用StatFilter默认值true
      web-stat-filter.enabled: true
      web-stat-filter.url-pattern:  /*
      web-stat-filter.exclusions: "*.js , *.gif ,*.jpg ,*.png ,*.css ,*.ico , /druid/*"
      web-stat-filter.session-stat-max-count: 1000
      web-stat-filter.profile-enable: true
      # StatViewServlet配置
      #展示Druid的统计信息,StatViewServlet的用途包括:1.提供监控信息展示的html页面2.提供监控信息的JSON API
      #是否启用StatViewServlet默认值true
      stat-view-servlet.enabled: true
      #根据配置中的url-pattern来访问内置监控页面,如果是上面的配置,内置监控页面的首页是/druid/index.html例如:
      #http://110.76.43.235:9000/druid/index.html
      #http://110.76.43.235:8080/mini-web/druid/index.html
      stat-view-servlet.url-pattern:  /druid/*
      #允许清空统计数据
      stat-view-servlet.reset-enable:  true
      stat-view-servlet.login-username: admin
      stat-view-servlet.login-password: admin
      #StatViewSerlvet展示出来的监控信息比较敏感,是系统运行的内部情况,如果你需要做访问控制,可以配置allow和deny这两个参数
      #deny优先于allow,如果在deny列表中,就算在allow列表中,也会被拒绝。如果allow没有配置或者为空,则允许所有访问
      #配置的格式
      #<IP>
      #或者<IP>/<SUB_NET_MASK_size>其中128.242.127.1/24
      #24表示,前面24位是子网掩码,比对的时候,前面24位相同就匹配,不支持IPV6。
      #stat-view-servlet.allow=
      #stat-view-servlet.deny=128.242.127.1/24,128.242.128.1
      # Spring监控配置,说明请参考Druid Github Wiki,配置_Druid和Spring关联监控配置
      #aop-patterns= # Spring监控AOP切入点,如x.y.z.service.*,配置多个英文逗号分隔
################### mysq end ##########################


eureka:
  instance:
    hostname: localhost
    lease-expiration-duration-in-seconds: 60
    lease-renewal-interval-in-seconds: 10
  client:
    service-url:
      defaultZone: http://121.40.109.21:8761/eureka/,http://121.40.109.21:8762/eureka/


  redis:
    ################### redis 单机版 start ##########################
    host: localhost
    port: 6379
    timeout: 6000
    database: 2
    lettuce:
      pool:
        max-active: 10 # 连接池最大连接数(使用负值表示没有限制),如果赋值为-1,则表示不限制;如果pool已经分配了maxActive个jedis实例,则此时pool的状态为exhausted(耗尽)
        max-idle: 8   # 连接池中的最大空闲连接 ,默认值也是8
        max-wait: 100 # # 等待可用连接的最大时间,单位毫秒,默认值为-1,表示永不超时。如果超过等待时间,则直接抛出JedisConnectionException
        min-idle: 2    # 连接池中的最小空闲连接 ,默认值也是0
      shutdown-timeout: 100ms