Commit 98e3a7170f8acf43dc8039116ecb3c5da109fc92
1 parent
03f8b6c3
新增test环境配置项
Showing
5 changed files
with
245 additions
and
16 deletions
class-service.yml
| @@ -74,36 +74,102 @@ apiConfig: | @@ -74,36 +74,102 @@ apiConfig: | ||
| 74 | --- | 74 | --- |
| 75 | 75 | ||
| 76 | spring: | 76 | spring: |
| 77 | - profiles: production | 77 | + profiles: test |
| 78 | cloud: | 78 | cloud: |
| 79 | config: | 79 | config: |
| 80 | discovery: | 80 | discovery: |
| 81 | enabled: true | 81 | enabled: true |
| 82 | - datasource: | ||
| 83 | - name: eaas_core | ||
| 84 | - url: jdbc:mysql://emysql3:3306/eaas_core?useUnicode=true&characterEncoding=gbk&zeroDateTimeBehavior=convertToNull | ||
| 85 | - username: test | ||
| 86 | - password: 123456 | ||
| 87 | - driver-class-name: com.mysql.jdbc.Driver | 82 | + |
| 88 | coreDatasource: | 83 | coreDatasource: |
| 89 | write: | 84 | write: |
| 90 | name: gxb_core | 85 | name: gxb_core |
| 91 | - url: jdbc:mysql://emysql3:3306/gxb_core?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true | 86 | + url: jdbc:mysql://testdb-master:3306/gxb_core?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true |
| 92 | username: test | 87 | username: test |
| 93 | password: 123456 | 88 | password: 123456 |
| 94 | driver-class-name: com.mysql.jdbc.Driver | 89 | driver-class-name: com.mysql.jdbc.Driver |
| 95 | read1: | 90 | read1: |
| 96 | name: gxb_core | 91 | name: gxb_core |
| 97 | - url: jdbc:mysql://emysql3:3306/gxb_core?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true | 92 | + url: jdbc:mysql://testdb-master:3306/gxb_core?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true |
| 98 | username: test | 93 | username: test |
| 99 | password: 123456 | 94 | password: 123456 |
| 100 | driver-class-name: com.mysql.jdbc.Driver | 95 | driver-class-name: com.mysql.jdbc.Driver |
| 101 | 96 | ||
| 102 | secondDatasource: | 97 | secondDatasource: |
| 103 | name: gxb_core | 98 | name: gxb_core |
| 104 | - url: jdbc:mysql://101.200.173.244:3306/gxb_core?useUnicode=true&characterEncoding=UTF-8 | ||
| 105 | - username: rd | ||
| 106 | - password: 0Crofg6WIDslONnmqgQLWv14Ekb6028G | 99 | + url: jdbc:mysql://testdb-master:3306/gxb_core?useUnicode=true&characterEncoding=UTF-8 |
| 100 | + username: test | ||
| 101 | + password: 123456 | ||
| 102 | + driver-class-name: com.mysql.jdbc.Driver | ||
| 103 | + redis: | ||
| 104 | + database: 0 | ||
| 105 | + host: redis-server | ||
| 106 | + port: 6379 | ||
| 107 | + pool: | ||
| 108 | + max-idle: 100 | ||
| 109 | + min-idle: 10 | ||
| 110 | + max-active: 1000 | ||
| 111 | + max-wait: 100000 | ||
| 112 | + sentinel: | ||
| 113 | + master: mymaster1 | ||
| 114 | + nodes: redis-server:16379,redis-server:16379 | ||
| 115 | + | ||
| 116 | +mybatis: | ||
| 117 | + mapperLocations: classpath:/mybatis/*.xml | ||
| 118 | + typeAliasesPackage: com.huike.eaas.microservice.classes.domains | ||
| 119 | + config: classpath:mybatis-config.xml | ||
| 120 | + | ||
| 121 | + | ||
| 122 | +#mybatis: | ||
| 123 | + #configLocation: classpath:mybatis-config.xml | ||
| 124 | + | ||
| 125 | +endpoints: | ||
| 126 | + restart: | ||
| 127 | + enabled: true | ||
| 128 | + shutdown: | ||
| 129 | + enabled: true | ||
| 130 | + health: | ||
| 131 | + sensitive: false | ||
| 132 | + | ||
| 133 | +eureka: | ||
| 134 | + instance: | ||
| 135 | + hostname: class-service | ||
| 136 | + client: | ||
| 137 | + registerWithEureka: true | ||
| 138 | + fetchRegistry: false | ||
| 139 | + serviceUrl: | ||
| 140 | + defaultZone: http://discovery:15200/eureka/ | ||
| 141 | + | ||
| 142 | +# 一些公共的常量配置 | ||
| 143 | +apiConfig: | ||
| 144 | + resourceGaoXiaoBangUrl: https://resource.gaoxiaobang.com | ||
| 145 | + usrLocalTomcatTempLocation: /usr/local/tomcat/temp | ||
| 146 | +--- | ||
| 147 | + | ||
| 148 | +spring: | ||
| 149 | + profiles: production | ||
| 150 | + cloud: | ||
| 151 | + config: | ||
| 152 | + discovery: | ||
| 153 | + enabled: true | ||
| 154 | + coreDatasource: | ||
| 155 | + write: | ||
| 156 | + name: gxb_core | ||
| 157 | + url: jdbc:mysql://emysql3:3306/gxb_core?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true | ||
| 158 | + username: postgres | ||
| 159 | + password: 5095e001221824498ea622e89bdd3627 | ||
| 160 | + driver-class-name: com.mysql.jdbc.Driver | ||
| 161 | + read1: | ||
| 162 | + name: gxb_core | ||
| 163 | + url: jdbc:mysql://db3:3306/gxb_core?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true | ||
| 164 | + username: postgres | ||
| 165 | + password: 5095e001221824498ea622e89bdd3627 | ||
| 166 | + driver-class-name: com.mysql.jdbc.Driver | ||
| 167 | + | ||
| 168 | + secondDatasource: | ||
| 169 | + name: gxb_core | ||
| 170 | + url: jdbc:mysql://emysql3:3306/gxb_core?useUnicode=true&characterEncoding=UTF-8 | ||
| 171 | + username: postgres | ||
| 172 | + password: 5095e001221824498ea622e89bdd3627 | ||
| 107 | driver-class-name: com.mysql.jdbc.Driver | 173 | driver-class-name: com.mysql.jdbc.Driver |
| 108 | redis: | 174 | redis: |
| 109 | database: 0 | 175 | database: 0 |
config.yml
| @@ -32,6 +32,36 @@ eureka: | @@ -32,6 +32,36 @@ eureka: | ||
| 32 | 32 | ||
| 33 | --- | 33 | --- |
| 34 | 34 | ||
| 35 | +spring: | ||
| 36 | + profiles: test | ||
| 37 | + cloud: | ||
| 38 | + config: | ||
| 39 | + discovery: | ||
| 40 | + enabled: true | ||
| 41 | + server: | ||
| 42 | + git: | ||
| 43 | + uri: http://gitlab.gaoxiaobang.com/zygj/huike-eaas-config.git | ||
| 44 | + username: xzli | ||
| 45 | + password: kkb-lixzh1986 | ||
| 46 | + | ||
| 47 | +endpoints: | ||
| 48 | + restart: | ||
| 49 | + enabled: true | ||
| 50 | + shutdown: | ||
| 51 | + enabled: true | ||
| 52 | + health: | ||
| 53 | + sensitive: false | ||
| 54 | + | ||
| 55 | +eureka: | ||
| 56 | + instance: | ||
| 57 | + hostname: configserver | ||
| 58 | + client: | ||
| 59 | + registerWithEureka: true | ||
| 60 | + fetchRegistry: false | ||
| 61 | + serviceUrl: | ||
| 62 | + defaultZone: http://discovery:15200/eureka/ | ||
| 63 | + | ||
| 64 | +--- | ||
| 35 | 65 | ||
| 36 | spring: | 66 | spring: |
| 37 | profiles: production | 67 | profiles: production |
discovery.yml
| @@ -28,6 +28,32 @@ eureka: | @@ -28,6 +28,32 @@ eureka: | ||
| 28 | --- | 28 | --- |
| 29 | 29 | ||
| 30 | spring: | 30 | spring: |
| 31 | + profiles: test | ||
| 32 | + cloud: | ||
| 33 | + config: | ||
| 34 | + discovery: | ||
| 35 | + enabled: true | ||
| 36 | + | ||
| 37 | +endpoints: | ||
| 38 | + restart: | ||
| 39 | + enabled: true | ||
| 40 | + shutdown: | ||
| 41 | + enabled: true | ||
| 42 | + health: | ||
| 43 | + sensitive: false | ||
| 44 | + | ||
| 45 | +eureka: | ||
| 46 | + instance: | ||
| 47 | + hostname: discovery | ||
| 48 | + client: | ||
| 49 | + registerWithEureka: false | ||
| 50 | + fetchRegistry: false | ||
| 51 | + serviceUrl: | ||
| 52 | + defaultZone: http://${eureka.instance.hostname}:${server.port}/eureka/ | ||
| 53 | + | ||
| 54 | +--- | ||
| 55 | + | ||
| 56 | +spring: | ||
| 31 | profiles: production | 57 | profiles: production |
| 32 | cloud: | 58 | cloud: |
| 33 | config: | 59 | config: |
gateway.yml
| @@ -51,6 +51,60 @@ cas: | @@ -51,6 +51,60 @@ cas: | ||
| 51 | 51 | ||
| 52 | tenant: | 52 | tenant: |
| 53 | tenantId: 438 | 53 | tenantId: 438 |
| 54 | + | ||
| 55 | +--- | ||
| 56 | + | ||
| 57 | +spring: | ||
| 58 | + profiles: test | ||
| 59 | + cloud: | ||
| 60 | + config: | ||
| 61 | + discovery: | ||
| 62 | + enabled: true | ||
| 63 | + | ||
| 64 | +endpoints: | ||
| 65 | + restart: | ||
| 66 | + enabled: true | ||
| 67 | + shutdown: | ||
| 68 | + enabled: true | ||
| 69 | + health: | ||
| 70 | + sensitive: false | ||
| 71 | + | ||
| 72 | +zuul: | ||
| 73 | + routes: | ||
| 74 | + users: | ||
| 75 | + #url: http://user-service:16100 | ||
| 76 | + serviceId: user-service | ||
| 77 | + classes: | ||
| 78 | + #url: http://class-service:16200 | ||
| 79 | + serviceId: class-service | ||
| 80 | + | ||
| 81 | +#这个配置为true则取发现服务的注册地址(服务地址存储在DomainExtractingServerList,由EurekaRibbonClientConfiguration.ribbonServerList()创建) | ||
| 82 | +#为false取本地配置文件的配置地址(服务地址存储在ConfigurationBasedServerList中,由RibbonClientConfiguration.ribbonServerList()创建) | ||
| 83 | +ribbon: | ||
| 84 | + eureka: | ||
| 85 | + enabled: true | ||
| 86 | + UseIPAddrForServer: true | ||
| 87 | + | ||
| 88 | + | ||
| 89 | +eureka: | ||
| 90 | + instance: | ||
| 91 | + hostname: gateway | ||
| 92 | + client: | ||
| 93 | + registerWithEureka: true | ||
| 94 | + fetchRegistry: true | ||
| 95 | + serviceUrl: | ||
| 96 | + defaultZone: http://discovery:15200/eureka/ | ||
| 97 | + | ||
| 98 | +cas: | ||
| 99 | + encoding: UTF-8 | ||
| 100 | + casServerUrlPrefix: https://cas.gaoxiaobang.com/ | ||
| 101 | + casServerLoginUrl: https://cas.gaoxiaobang.com/login | ||
| 102 | + casServerLogoutUrl: https://cas.gaoxiaobang.com/logout | ||
| 103 | + ignorePattern: (^(/mvc/goto/)|(\.ico)|(/js)|(/image)|(/css)|(/fonts)|(/api)|(/downloadfile))|(.jsp$) | ||
| 104 | + | ||
| 105 | +tenant: | ||
| 106 | + tenantId: 438 | ||
| 107 | + | ||
| 54 | --- | 108 | --- |
| 55 | 109 | ||
| 56 | spring: | 110 | spring: |
| @@ -95,4 +149,7 @@ cas: | @@ -95,4 +149,7 @@ cas: | ||
| 95 | casServerUrlPrefix: https://cas.gaoxiaobang.com/ | 149 | casServerUrlPrefix: https://cas.gaoxiaobang.com/ |
| 96 | casServerLoginUrl: https://cas.gaoxiaobang.com/login | 150 | casServerLoginUrl: https://cas.gaoxiaobang.com/login |
| 97 | casServerLogoutUrl: https://cas.gaoxiaobang.com/logout | 151 | casServerLogoutUrl: https://cas.gaoxiaobang.com/logout |
| 98 | - ignorePattern: (^(/mvc/goto/)|(\.ico)|(/js)|(/image)|(/css)|(/fonts)|(/api)|(/downloadfile))|(.jsp$) | ||
| 99 | \ No newline at end of file | 152 | \ No newline at end of file |
| 153 | + ignorePattern: (^(/mvc/goto/)|(\.ico)|(/js)|(/image)|(/css)|(/fonts)|(/api)|(/downloadfile))|(.jsp$) | ||
| 154 | + | ||
| 155 | +tenant: | ||
| 156 | + tenantId: 991 | ||
| 100 | \ No newline at end of file | 157 | \ No newline at end of file |
user-service.yml
| @@ -47,17 +47,18 @@ eureka: | @@ -47,17 +47,18 @@ eureka: | ||
| 47 | fetchRegistry: false | 47 | fetchRegistry: false |
| 48 | serviceUrl: | 48 | serviceUrl: |
| 49 | defaultZone: http://discovery:15200/eureka/ | 49 | defaultZone: http://discovery:15200/eureka/ |
| 50 | + | ||
| 50 | --- | 51 | --- |
| 51 | 52 | ||
| 52 | spring: | 53 | spring: |
| 53 | - profiles: production | 54 | + profiles: test |
| 54 | cloud: | 55 | cloud: |
| 55 | config: | 56 | config: |
| 56 | discovery: | 57 | discovery: |
| 57 | enabled: true | 58 | enabled: true |
| 58 | datasource: | 59 | datasource: |
| 59 | name: gxb_core | 60 | name: gxb_core |
| 60 | - url: jdbc:mysql://emysql3:3306/gxb_core?useUnicode=true&characterEncoding=gbk&zeroDateTimeBehavior=convertToNull | 61 | + url: jdbc:mysql://testdb-master:3306/gxb_core?useUnicode=true&characterEncoding=gbk&zeroDateTimeBehavior=convertToNull |
| 61 | username: test | 62 | username: test |
| 62 | password: 123456 | 63 | password: 123456 |
| 63 | driver-class-name: com.mysql.jdbc.Driver | 64 | driver-class-name: com.mysql.jdbc.Driver |
| @@ -72,7 +73,56 @@ spring: | @@ -72,7 +73,56 @@ spring: | ||
| 72 | max-wait: 100000 | 73 | max-wait: 100000 |
| 73 | sentinel: | 74 | sentinel: |
| 74 | master: mymaster1 | 75 | master: mymaster1 |
| 75 | - nodes: redis-server:16379,redis-server:16379 | 76 | + nodes: redis1:16379,redis2:16379 |
| 77 | + | ||
| 78 | +mybatis: | ||
| 79 | + mapperLocations: classpath:/mybatis/*.xml | ||
| 80 | + typeAliasesPackage: com.huike.eaas.microservice.users.domain | ||
| 81 | + config: classpath:mybatis-config.xml | ||
| 82 | + | ||
| 83 | +endpoints: | ||
| 84 | + restart: | ||
| 85 | + enabled: true | ||
| 86 | + shutdown: | ||
| 87 | + enabled: true | ||
| 88 | + health: | ||
| 89 | + sensitive: false | ||
| 90 | + | ||
| 91 | +eureka: | ||
| 92 | + instance: | ||
| 93 | + hostname: user-service | ||
| 94 | + client: | ||
| 95 | + registerWithEureka: true | ||
| 96 | + fetchRegistry: false | ||
| 97 | + serviceUrl: | ||
| 98 | + defaultZone: http://discovery:15200/eureka/ | ||
| 99 | + | ||
| 100 | +--- | ||
| 101 | + | ||
| 102 | +spring: | ||
| 103 | + profiles: production | ||
| 104 | + cloud: | ||
| 105 | + config: | ||
| 106 | + discovery: | ||
| 107 | + enabled: true | ||
| 108 | + datasource: | ||
| 109 | + name: gxb_core | ||
| 110 | + url: jdbc:mysql://emysql3:3306/gxb_core?useUnicode=true&characterEncoding=gbk&zeroDateTimeBehavior=convertToNull | ||
| 111 | + username: postgres | ||
| 112 | + password: 5095e001221824498ea622e89bdd3627 | ||
| 113 | + driver-class-name: com.mysql.jdbc.Driver | ||
| 114 | + redis: | ||
| 115 | + database: 0 | ||
| 116 | + host: redis-server | ||
| 117 | + port: 6379 | ||
| 118 | + pool: | ||
| 119 | + max-idle: 100 | ||
| 120 | + min-idle: 10 | ||
| 121 | + max-active: 1000 | ||
| 122 | + max-wait: 100000 | ||
| 123 | + sentinel: | ||
| 124 | + master: mymaster1 | ||
| 125 | + nodes: redis1:16379,redis2:16379 | ||
| 76 | 126 | ||
| 77 | mybatis: | 127 | mybatis: |
| 78 | mapperLocations: classpath:/mybatis/*.xml | 128 | mapperLocations: classpath:/mybatis/*.xml |