class-service.yml 8.94 KB
server:
  port: 16200

spring:
  profiles: development
  cloud:
    config:
      discovery:
        enabled: true
  aop:
    proxy-target-class: true

  coreDatasource:
    write:
      name: gxb_core
      url: jdbc:mysql://testdb-master:3306/gxb_core?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true
      username: test
      password: 123456
      driver-class-name: com.mysql.jdbc.Driver
      max-idle: 10
      max-active: 30
      max-wait: 60000
      min-idle: 10
      initial-size: 10
      validation-query: SELECT 1
      test-on-borrow: true
      test-while-idle: true
    read1:
      name: gxb_core
      url: jdbc:mysql://testdb-master:3306/gxb_core?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true
      username: test
      password: 123456
      driver-class-name: com.mysql.jdbc.Driver
      max-idle: 10
      max-active: 30
      max-wait: 60000
      min-idle: 10
      initial-size: 10
      validation-query: SELECT 1
      test-on-borrow: true
      test-while-idle: true
      
  secondDatasource:
    name: gxb_core
    url: jdbc:mysql://testdb-master:3306/gxb_core?useUnicode=true&characterEncoding=UTF-8
    username: test
    password: 123456
    driver-class-name: com.mysql.jdbc.Driver
    max-idle: 10
    max-active: 30
    max-wait: 60000
    min-idle: 10
    initial-size: 10
    validation-query: SELECT 1
    test-on-borrow: true
    test-while-idle: true
  redis:
    database: 0
    host: redis-server
    port: 6379
    password: 123456
    pool:
      max-idle: 100
      min-idle: 10
      max-active: 1000
      max-wait: 100000
    sentinel:
      master: mymaster1
      nodes: redis-server:16379,redis-server:16379

mybatis:
  mapperLocations: classpath:/mybatis/*.xml
  typeAliasesPackage: com.huike.eaas.microservice.classes.domains
  config: classpath:mybatis-config.xml
  

#mybatis:
  #configLocation: classpath:mybatis-config.xml

endpoints:
  restart:
    enabled: true
  shutdown:
    enabled: true
  health:
    sensitive: false

eureka:
  instance:
    hostname: class-service
    perferIpAddress: true
    instance-id: ${spring.cloud.client.ipAddress}:${server.port}
    leaseRenewalIntervalInSeconds: 5
    leaseExpirationDurationInSeconds: 15
  client:
    registerWithEureka: true
    fetchRegistry: true
    serviceUrl:
      defaultZone: http://discovery:15200/eureka/
    healthcheck:
      enabled: true
      
hystrix:
  command:
    default:
      execution:
        timeout:
          enabled: true
        isolation:
          thread:
            timeoutInMilliseconds: 60000

#这个配置为true则取发现服务的注册地址(服务地址存储在DomainExtractingServerList,由EurekaRibbonClientConfiguration.ribbonServerList()创建)
#为false取本地配置文件的配置地址(服务地址存储在ConfigurationBasedServerList中,由RibbonClientConfiguration.ribbonServerList()创建)
ribbon:
  eureka:
    enabled: true
  UseIPAddrForServer: true
  ReadTimeout: 5000
  ConnectTimeout: 10000

# 一些公共的常量配置
apiConfig:
  resourceGaoXiaoBangUrl: https://resource.gaoxiaobang.com
  usrLocalTomcatTempLocation: /usr/local/tomcat/temp
  gxbApiUrl: http://gxb-api:8080/gxb-api
---
server:
  port: 16200

spring:
  profiles: test
  cloud:
    config:
      discovery:
        enabled: true

  coreDatasource:
    write:
      name: gxb_core
      url: jdbc:mysql://testdb-master:3306/gxb_core?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true
      username: test
      password: 123456
      driver-class-name: com.mysql.jdbc.Driver
      max-idle: 10
      max-active: 30
      max-wait: 60000
      min-idle: 10
      initial-size: 10
      validation-query: SELECT 1
      test-on-borrow: true
      test-while-idle: true
    read1:
      name: gxb_core
      url: jdbc:mysql://testdb-master:3306/gxb_core?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true
      username: test
      password: 123456
      driver-class-name: com.mysql.jdbc.Driver
      max-idle: 10
      max-active: 30
      max-wait: 60000
      min-idle: 10
      initial-size: 10
      validation-query: SELECT 1
      test-on-borrow: true
      test-while-idle: true
      
  secondDatasource:
    name: gxb_core
    url: jdbc:mysql://testdb-master:3306/gxb_core?useUnicode=true&characterEncoding=UTF-8
    username: test
    password: 123456
    driver-class-name: com.mysql.jdbc.Driver
    max-idle: 10
    max-active: 30
    max-wait: 60000
    min-idle: 10
    initial-size: 10
    validation-query: SELECT 1
    test-on-borrow: true
    test-while-idle: true
  redis:
    database: 0
    host: redis-server
    port: 6379
    password: 123456
    pool:
      max-idle: 100
      min-idle: 10
      max-active: 1000
      max-wait: 100000
    sentinel:
      master: mymaster1
      nodes: redis-server:16379,redis-server:16379

mybatis:
  mapperLocations: classpath:/mybatis/*.xml
  typeAliasesPackage: com.huike.eaas.microservice.classes.domains
  config: classpath:mybatis-config.xml
  

#mybatis:
  #configLocation: classpath:mybatis-config.xml

endpoints:
  restart:
    enabled: true
  shutdown:
    enabled: true
  health:
    sensitive: false

eureka:
  instance:
    hostname: class-service
    perferIpAddress: true
  client:
    registerWithEureka: true
    fetchRegistry: true
    serviceUrl:
      defaultZone: http://discovery:15200/eureka/
      
hystrix:
  command:
    default:
      execution:
        timeout:
          enabled: true
        isolation:
          thread:
            timeoutInMilliseconds: 60000

#这个配置为true则取发现服务的注册地址(服务地址存储在DomainExtractingServerList,由EurekaRibbonClientConfiguration.ribbonServerList()创建)
#为false取本地配置文件的配置地址(服务地址存储在ConfigurationBasedServerList中,由RibbonClientConfiguration.ribbonServerList()创建)
ribbon:
  eureka:
    enabled: true
  UseIPAddrForServer: true
  ReadTimeout: 5000
  ConnectTimeout: 10000

# 一些公共的常量配置
apiConfig:
  resourceGaoXiaoBangUrl: https://resource.gaoxiaobang.com
  usrLocalTomcatTempLocation: /usr/local/tomcat/temp
  gxbApiUrl: http://gxb-api:8080/gxb-api
---
server:
  port: 16200

spring:
  profiles: production
  cloud:
    config:
      discovery:
        enabled: true
  coreDatasource:
    write:
      name: gxb_core
      url: jdbc:mysql://emysql3:3306/gxb_core?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true
      username: postgres
      password: 5095e001221824498ea622e89bdd3627
      driver-class-name: com.mysql.jdbc.Driver
      max-idle: 10
      max-active: 30
      max-wait: 60000
      min-idle: 10
      initial-size: 10
      validation-query: SELECT 1
      test-on-borrow: true
      test-while-idle: true
    read1:
      name: gxb_core
      url: jdbc:mysql://db3:3306/gxb_core?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true
      username: postgres
      password: 5095e001221824498ea622e89bdd3627
      driver-class-name: com.mysql.jdbc.Driver
      max-idle: 10
      max-active: 30
      max-wait: 60000
      min-idle: 10
      initial-size: 10
      validation-query: SELECT 1
      test-on-borrow: true
      test-while-idle: true
      
  secondDatasource:
    name: gxb_core
    url: jdbc:mysql://emysql3:3306/gxb_core?useUnicode=true&characterEncoding=UTF-8
    username: postgres
    password: 5095e001221824498ea622e89bdd3627
    driver-class-name: com.mysql.jdbc.Driver
    max-idle: 10
    max-active: 30
    max-wait: 60000
    min-idle: 10
    initial-size: 10
    validation-query: SELECT 1
    test-on-borrow: true
    test-while-idle: true
  redis:
    database: 0
    host: redis1
    port: 6379
    password: 6cxbJLDsHU%^QG^qJwpT7ow
    pool:
      max-idle: 100
      min-idle: 10
      max-active: 1000
      max-wait: 100000
    sentinel:
      master: mymaster1
      nodes: redis1:16379,redis2:16379

mybatis:
  mapperLocations: classpath:/mybatis/*.xml
  typeAliasesPackage: com.huike.eaas.microservice.classes.domains
  config: classpath:mybatis-config.xml

endpoints:
  restart:
    enabled: true
  shutdown:
    enabled: true
  health:
    sensitive: false

eureka:
  instance:
    perferIpAddress: true
  client:
    registerWithEureka: true
    fetchRegistry: true
    serviceUrl:
      defaultZone: http://discovery:15200/eureka/
      
hystrix:
  command:
    default:
      execution:
        timeout:
          enabled: true
        isolation:
          thread:
            timeoutInMilliseconds: 60000

#这个配置为true则取发现服务的注册地址(服务地址存储在DomainExtractingServerList,由EurekaRibbonClientConfiguration.ribbonServerList()创建)
#为false取本地配置文件的配置地址(服务地址存储在ConfigurationBasedServerList中,由RibbonClientConfiguration.ribbonServerList()创建)
ribbon:
  eureka:
    enabled: true
  UseIPAddrForServer: true
  ReadTimeout: 5000
  ConnectTimeout: 10000

# 一些公共的常量配置
apiConfig:
  resourceGaoXiaoBangUrl: https://resource.gaoxiaobang.com
  usrLocalTomcatTempLocation: /usr/local/tomcat/temp
  gxbApiUrl: http://api/gxb-api