Commit 7621c9a18d91bede810436c613610699de30c41a

Authored by 刘岱鹏
1 parent cfe70664

添加配置文件

class-service.yml
... ... @@ -73,6 +73,18 @@ spring:
73 73 #date-format: yyyy-MM-dd HH:mm:ss
74 74 #deserialization.accept_empty_string_as_null_object: true
75 75  
  76 + activemq:
  77 + broker-url: failover:(tcp://mqserver:61616)?initialReconnectDelay=100 #ActiveMQ use static transport for broker clusters. multicast discovery for broker clusters, JmsListener cannot auto receive messages from some ActiveMQ servers
  78 + inMemory: true
  79 + pool:
  80 + enabled: true
  81 + max-connections: 5
  82 + idle-timeout: 30000
  83 + expiry-timeout: 0
  84 + jackson:
  85 + time-zone: GMT+8
  86 + date-format: yyyy-MM-dd HH:mm:ss
  87 + deserialization.accept_empty_string_as_null_object: true
76 88  
77 89 mybatis:
78 90 mapperLocations: classpath:/mybatis/*.xml
... ...
schedule-service.yml 0 → 100644
  1 +server:
  2 + port: 16500
  3 +
  4 +spring:
  5 + profiles: development
  6 + cloud:
  7 + config:
  8 + discovery:
  9 + enabled: true
  10 + aop:
  11 + proxy-target-class: true
  12 +
  13 + coreDatasource:
  14 + write:
  15 + name: gxb_core
  16 + url: jdbc:mysql://testdb-master:3306/gxb_core?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true
  17 + username: test
  18 + password: ENC(8aea42e66b0928c44cd8f861a9d558e6)
  19 + driver-class-name: com.mysql.jdbc.Driver
  20 + max-idle: 10
  21 + max-active: 30
  22 + max-wait: 60000
  23 + min-idle: 10
  24 + initial-size: 10
  25 + validation-query: SELECT 1
  26 + test-on-borrow: true
  27 + test-while-idle: true
  28 + read1:
  29 + name: gxb_core
  30 + url: jdbc:mysql://testdb-master:3306/gxb_core?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true
  31 + username: test
  32 + password: ENC(8aea42e66b0928c44cd8f861a9d558e6)
  33 + driver-class-name: com.mysql.jdbc.Driver
  34 + max-idle: 10
  35 + max-active: 30
  36 + max-wait: 60000
  37 + min-idle: 10
  38 + initial-size: 10
  39 + validation-query: SELECT 1
  40 + test-on-borrow: true
  41 + test-while-idle: true
  42 +
  43 + secondDatasource:
  44 + name: gxb_core
  45 + url: jdbc:mysql://testdb-master:3306/gxb_core?useUnicode=true&characterEncoding=UTF-8
  46 + username: test
  47 + password: ENC(8aea42e66b0928c44cd8f861a9d558e6)
  48 + driver-class-name: com.mysql.jdbc.Driver
  49 + max-idle: 10
  50 + max-active: 30
  51 + max-wait: 60000
  52 + min-idle: 10
  53 + initial-size: 10
  54 + validation-query: SELECT 1
  55 + test-on-borrow: true
  56 + test-while-idle: true
  57 + redis:
  58 + database: 0
  59 + host: redis-server
  60 + port: 6379
  61 + password: ENC(8aea42e66b0928c44cd8f861a9d558e6)
  62 + pool:
  63 + max-idle: 100
  64 + min-idle: 10
  65 + max-active: 1000
  66 + max-wait: 100000
  67 + #sentinel:
  68 + #master: mymaster1
  69 + #nodes: redis-server:16379,redis-server:16379
  70 +
  71 + #jackson:
  72 + #time-zone: GMT+8
  73 + #date-format: yyyy-MM-dd HH:mm:ss
  74 + #deserialization.accept_empty_string_as_null_object: true
  75 +
  76 +
  77 +mybatis:
  78 + mapperLocations: classpath:/mybatis/*.xml
  79 + typeAliasesPackage: com.huike.eaas.microservice.classes.domains
  80 + config: classpath:mybatis-config.xml
  81 +
  82 +
  83 +#mybatis:
  84 + #configLocation: classpath:mybatis-config.xml
  85 +
  86 +endpoints:
  87 + restart:
  88 + enabled: true
  89 + shutdown:
  90 + enabled: true
  91 + health:
  92 + sensitive: false
  93 +
  94 +eureka:
  95 + instance:
  96 + hostname: schedule-service
  97 + perferIpAddress: true
  98 + instance-id: ${spring.cloud.client.ipAddress}:${server.port}
  99 + leaseRenewalIntervalInSeconds: 5
  100 + leaseExpirationDurationInSeconds: 15
  101 + client:
  102 + registerWithEureka: true
  103 + fetchRegistry: true
  104 + serviceUrl:
  105 + defaultZone: http://discovery:15200/eureka/
  106 + healthcheck:
  107 + enabled: true
  108 +
  109 +hystrix:
  110 + command:
  111 + default:
  112 + execution:
  113 + timeout:
  114 + enabled: true
  115 + isolation:
  116 + thread:
  117 + timeoutInMilliseconds: 60000
  118 +
  119 +
  120 +#这个配置为true则取发现服务的注册地址(服务地址存储在DomainExtractingServerList,由EurekaRibbonClientConfiguration.ribbonServerList()创建)
  121 +#为false取本地配置文件的配置地址(服务地址存储在ConfigurationBasedServerList中,由RibbonClientConfiguration.ribbonServerList()创建)
  122 +ribbon:
  123 + eureka:
  124 + enabled: true
  125 + UseIPAddrForServer: true
  126 + ReadTimeout: 5000
  127 + ConnectTimeout: 10000
... ...