SpringCloud 之 gateway网管服务配置文件

application.yml:

app:
  instance:
    code: ibmp-interface-gateway
    profile: dev
  rest:
    # profile: dev
    profiles:
      datacenter: dev
  file:
    upload-path: f:\file\upload
    template-path: classpath:template
  authority:
    login:
      allow-retry-times: 3   # 登录失败超过该次数要求输入验证码
    menu:
      operate: false # 是否控制菜单按钮权限
  layout:
    menu:
      expand-first: true # 展开第一个菜单
  task:
    exchange: "0 0/60 * * * ?"
  redis:
    prefix:
    # 过期时间,以秒为单位
    # expire: 3600
  error:
    prefix: P
  token:
    access:
      # 超时时间,以秒为单位
      expire: 600
    refresh:
      expire: 1200
  ess:
    host: 127.0.0.1
    port: 8113
server:
  port: 7000
  #ssl:
    #key-store: classpath:keystore.p12
   # key-store-password: 123456
   # key-store-type: PKCS12
  #  key-alias: tomcat
logging:
  level:
    root: info
    com.baidu: debug
    org.springframework.security: warn

spring:
  application:
    name: ${app.instance.code}-${app.instance.profile}
#  session:
#    store-type: none
  redis:
    # cluster:
    #   nodes: 127.0.0.1:20001,127.0.0.1:20002,127.0.0.1:20003
    host: 93.6.61.200
    port: 6379
  http:
    encoding:
      force: true
  servlet:
    multipart:
      max-file-size: 20MB # 最大文件大小
      max-request-size: 20MB # 最大请求大小
  jackson:
    date-format: yyyy-MM-dd HH:mm:ss
  session:
    timeout: 300s
  #aop:
    # proxy-target-class: true
    # auto: true
datasources:
  portal:
    datasource:
      jdbc-url: jdbc:oracle:thin:@193.16.62.100:1521/oracle
      username: name
      password: password
      driver-class-name: oracle.jdbc.OracleDriver
      # 初始化大小,最小,最大
      initial-size: 3
      min-idle: 2
      max-idle: 5
      max-active: 5
      # 配置获取连接等待超时的时间
      max-wait: 60000
      # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
      time-between-eviction-runs-millis: 60000
      # 配置一个连接在池中最小生存的时间,单位是毫秒
      min-evictable-idle-time-millis: 300000
      validation-query: select 1 from dual
      test-while-idle: true
      test-on-borrow: false
      test-on-return: false
    mybatis:
      dialect: org.apache.ibatis.dialect.OracleDialect
      base-package: com.baidu.commons.dao,com.icbc.portal.dao;com.icbc.gateway.api.dao
      aliases-package: com.baidu.commons.data,com.icbc.portal.data
      mapper-locations: classpath*:com/baidu/commons/mapping/*.xml,classpath:mapping/portal/*.xml
      underscore-to-camel-case: true
eureka:
  client:
      register-with-eureka: true #是否注册自身到eureka服务器
      fetch-registry: true #是否从服务端获取注册信息
      registry-fetch-interval-seconds: 5 #从服务端获取注册信息的时间间隔
      eureka-service-url-poll-interval-seconds: 120 #轮询服务端地址更改的间隔时间
      serviceUrl:
        defaultZone: http://127.0.0.1:8761/eureka/

  instance:
    #instance-id: ${spring.application.name}@${spring.cloud.client.ipAddress}:${spring.application.instance_id}:${server.port}}(${spring.cloud.client.hostname})
    instance-id: ${spring.application.name}@${spring.cloud.client.ip-address}:${server.port}}(${spring.cloud.client.hostname})
    prefer-ip-address: true  #是否优先IP作为主机名
    lease-renewal-interval-in-seconds: 1 #客户端向服务端发送心跳 s
    lease-expiration-duration-in-seconds: 2 #  有效期
    non-secure-port-enabled: false  #非安全的通信端口号
ribbon:
  ConnectTimeout: 300000
  ReadTimeout: 600000
  MaxTotalHttpConnections: 5000
  MaxHttpConnectionsPerHost: 5000
  ActiveConnectionsLimit: 5000
  eureka:
    enabled: true

serviceId:
  ibmp-oauth2-password: IBMP-OAUTH2-PASSWORD-DEV
  ibmp-channel-server: IBMP-CHANNEL-SERVER-DEV
  ibmp-front-client: IBMP-FRONT-CLIENT-DEV
  ibmp-oauth2-client: IBMP-OAUTH2-CLIENT-DEV
  

你可能感兴趣的:(Spring,Cloud)