Commit e270b93c844baf42fd48c4970b77cacfeeee5967

Authored by sunninghai
1 parent 881909a7

fix:测试

Showing 1 changed file with 26 additions and 198 deletions
cloud-product-service.yml
... ... @@ -60,6 +60,32 @@ mybatis:
60 60 typeAliasesPackage: com.huike.cloud.account
61 61 config: classpath:mybatis-config.xml
62 62  
  63 +sharding.jdbc:
  64 + dataSources:
  65 + ds_master:
  66 + driverClassName: com.mysql.jdbc.Driver
  67 + url: jdbc:mysql://testdb-master:3306/huikeyun?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true
  68 + username: test
  69 + password: ENC(8aea42e66b0928c44cd8f861a9d558e6)
  70 + ds_slave0:
  71 + driverClassName: com.mysql.jdbc.Driver
  72 + url: jdbc:mysql://testdb-slave1:3306/huikeyun?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true
  73 + username: test
  74 + password: ENC(8aea42e66b0928c44cd8f861a9d558e6)
  75 + masterSlaveRule:
  76 + name: ms_ds
  77 + masterDataSourceName: ds_master
  78 + slaveDataSourceNames: ds_slave0
  79 + props:
  80 + sql.show: true
  81 + shardingRule:
  82 + tables:
  83 + Account:
  84 + actualDataNodes: ms_ds.Account${0..1}
  85 + tableStrategy:
  86 + inline:
  87 + shardingColumn: UUID
  88 + algorithmExpression: Account${UUID.hashCode() % 2}
63 89  
64 90 #mybatis:
65 91 #configLocation: classpath:mybatis-config.xml
... ... @@ -107,204 +133,6 @@ ribbon:
107 133 ConnectTimeout: 10000
108 134  
109 135  
110   ----
111   -server:
112   - port: 17100
113   -
114   -spring:
115   - profiles: test
116   - cloud:
117   - config:
118   - discovery:
119   - enabled: true
120   -
121   - coreDatasource:
122   - write:
123   - name: huikeyun
124   - url: jdbc:mysql://testdb-master:3306/huikeyun?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true
125   - username: test
126   - password: ENC(8aea42e66b0928c44cd8f861a9d558e6)
127   - driver-class-name: com.mysql.jdbc.Driver
128   - max-idle: 10
129   - max-active: 30
130   - max-wait: 60000
131   - min-idle: 10
132   - initial-size: 10
133   - validation-query: SELECT 1
134   - test-on-borrow: true
135   - test-while-idle: true
136   - read1:
137   - name: huikeyun
138   - url: jdbc:mysql://testdb-master:3306/huikeyun?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true
139   - username: test
140   - password: ENC(8aea42e66b0928c44cd8f861a9d558e6)
141   - driver-class-name: com.mysql.jdbc.Driver
142   - max-idle: 10
143   - max-active: 30
144   - max-wait: 60000
145   - min-idle: 10
146   - initial-size: 10
147   - validation-query: SELECT 1
148   - test-on-borrow: true
149   - test-while-idle: true
150   -
151   -
152   - redis:
153   - database: 0
154   - host: redis-server
155   - port: 6379
156   - password: ENC(8aea42e66b0928c44cd8f861a9d558e6)
157   - pool:
158   - max-idle: 100
159   - min-idle: 10
160   - max-active: 1000
161   - max-wait: 100000
162   - #sentinel:
163   - #master: mymaster1
164   - #nodes: redis-server:16379,redis-server:16379
165   -
166   -mybatis:
167   - mapperLocations: classpath:/mybatis/*.xml
168   - typeAliasesPackage: com.huike.cloud.account
169   - config: classpath:mybatis-config.xml
170   -
171   -
172   -#mybatis:
173   - #configLocation: classpath:mybatis-config.xml
174   -
175   -endpoints:
176   - restart:
177   - enabled: true
178   - shutdown:
179   - enabled: true
180   - health:
181   - sensitive: false
182   -
183   -eureka:
184   - instance:
185   - hostname: account-service
186   - perferIpAddress: true
187   - client:
188   - registerWithEureka: true
189   - fetchRegistry: true
190   - serviceUrl:
191   - defaultZone: http://discovery:15200/eureka/
192   -
193   -hystrix:
194   - command:
195   - default:
196   - execution:
197   - timeout:
198   - enabled: true
199   - isolation:
200   - thread:
201   - timeoutInMilliseconds: 60000
202   -
203   -#这个配置为true则取发现服务的注册地址(服务地址存储在DomainExtractingServerList,由EurekaRibbonClientConfiguration.ribbonServerList()创建)
204   -#为false取本地配置文件的配置地址(服务地址存储在ConfigurationBasedServerList中,由RibbonClientConfiguration.ribbonServerList()创建)
205   -ribbon:
206   - eureka:
207   - enabled: true
208   - UseIPAddrForServer: true
209   - ReadTimeout: 5000
210   - ConnectTimeout: 10000
211   -
212   -
213   ----
214   -server:
215   - port: 17100
216   -
217   -spring:
218   - profiles: production
219   - cloud:
220   - config:
221   - discovery:
222   - enabled: true
223   - coreDatasource:
224   - write:
225   - name: huikeyun
226   - url: jdbc:mysql://db-master.gxb-base:3306/huikeyun?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true
227   - username: postgres
228   - password: ENC(d1b95542f58fbfb0e823af8f3974b1bda84f2dc413e5ec6bc9566bb3aa950a2be59ecaaf2ed5eb3a4b4101fcf299419a)
229   - driver-class-name: com.mysql.jdbc.Driver
230   - max-idle: 10
231   - max-active: 30
232   - max-wait: 60000
233   - min-idle: 10
234   - initial-size: 10
235   - validation-query: SELECT 1
236   - test-on-borrow: true
237   - test-while-idle: true
238   - read1:
239   - name: huikeyun
240   - url: jdbc:mysql://db-slave.gxb-base:3306/huikeyun?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true
241   - username: postgres
242   - password: ENC(d1b95542f58fbfb0e823af8f3974b1bda84f2dc413e5ec6bc9566bb3aa950a2be59ecaaf2ed5eb3a4b4101fcf299419a)
243   - driver-class-name: com.mysql.jdbc.Driver
244   - max-idle: 10
245   - max-active: 30
246   - max-wait: 60000
247   - min-idle: 10
248   - initial-size: 10
249   - validation-query: SELECT 1
250   - test-on-borrow: true
251   - test-while-idle: true
252   -
253   -
254   - redis:
255   - database: 0
256   - host: gxb-app-20180706.redis.rds.aliyuncs.com
257   - port: 6379
258   - password: ENC(263159d39cfeec890c46a4a51f13906ed438bacccea9fce79961c0b0eceac428)
259   - pool:
260   - max-idle: 100
261   - min-idle: 10
262   - max-active: 1000
263   - max-wait: 100000
264   - #sentinel:
265   - #master: mymaster1
266   - #nodes: redis1:16379,redis2:16379
267   -
268   -mybatis:
269   - mapperLocations: classpath:/mybatis/*.xml
270   - typeAliasesPackage: com.huike.cloud.account
271   - config: classpath:mybatis-config.xml
272   -
273   -endpoints:
274   - restart:
275   - enabled: true
276   - shutdown:
277   - enabled: true
278   - health:
279   - sensitive: false
280   -
281   -eureka:
282   - instance:
283   - perferIpAddress: true
284   - client:
285   - registerWithEureka: true
286   - fetchRegistry: true
287   - serviceUrl:
288   - defaultZone: http://discovery:15200/eureka/
289   -
290   -hystrix:
291   - command:
292   - default:
293   - execution:
294   - timeout:
295   - enabled: true
296   - isolation:
297   - thread:
298   - timeoutInMilliseconds: 60000
299   -
300   -#这个配置为true则取发现服务的注册地址(服务地址存储在DomainExtractingServerList,由EurekaRibbonClientConfiguration.ribbonServerList()创建)
301   -#为false取本地配置文件的配置地址(服务地址存储在ConfigurationBasedServerList中,由RibbonClientConfiguration.ribbonServerList()创建)
302   -ribbon:
303   - eureka:
304   - enabled: true
305   - UseIPAddrForServer: true
306   - ReadTimeout: 5000
307   - ConnectTimeout: 10000
308 136  
309 137  
310 138  
... ...