|
@@ -17,9 +17,87 @@ spring:
|
|
|
zipkin:
|
|
zipkin:
|
|
|
sender:
|
|
sender:
|
|
|
type: rabbit
|
|
type: rabbit
|
|
|
|
|
+ service:
|
|
|
|
|
+ name: ${spring.application.name}
|
|
|
sleuth:
|
|
sleuth:
|
|
|
sampler:
|
|
sampler:
|
|
|
- percentage: 1.0
|
|
|
|
|
|
|
+ percentage: 1
|
|
|
|
|
+ integration:
|
|
|
|
|
+ enabled: false
|
|
|
|
|
+ scheduled:
|
|
|
|
|
+ skip-pattern: "^org.*HystrixStreamTask$"
|
|
|
|
|
+ cloud:
|
|
|
|
|
+ gateway:
|
|
|
|
|
+ discovery:
|
|
|
|
|
+ locator:
|
|
|
|
|
+ enabled: true
|
|
|
|
|
+ routes:
|
|
|
|
|
+ - id: UI-SERVER
|
|
|
|
|
+ uri: lb://UI-SERVER
|
|
|
|
|
+ predicates:
|
|
|
|
|
+ - Path=/api/ui/**
|
|
|
|
|
+ filters:
|
|
|
|
|
+ - RewritePath=/api/ui/(?<segment>.*), /$\{segment}
|
|
|
|
|
+ - id: ACCOUNT-SERVER
|
|
|
|
|
+ uri: lb://ACCOUNT-SERVER
|
|
|
|
|
+ predicates:
|
|
|
|
|
+ - Path=/api/account/**
|
|
|
|
|
+ filters:
|
|
|
|
|
+ - RewritePath=/api/account/(?<segment>.*), /$\{segment}
|
|
|
|
|
+ - id: AUTH-SERVER
|
|
|
|
|
+ uri: lb://AUTH-SERVER
|
|
|
|
|
+ predicates:
|
|
|
|
|
+ - Path=/api/auth/**
|
|
|
|
|
+ filters:
|
|
|
|
|
+ - RewritePath=/api/auth/(?<segment>.*), /$\{segment}
|
|
|
|
|
+ - id: FILE-SERVER
|
|
|
|
|
+ uri: lb://FILE-SERVER
|
|
|
|
|
+ predicates:
|
|
|
|
|
+ - Path=/api/file/**
|
|
|
|
|
+ filters:
|
|
|
|
|
+ - RewritePath=/api/file/(?<segment>.*), /$\{segment}
|
|
|
|
|
+ - id: MAIL-SERVER
|
|
|
|
|
+ uri: lb://MAIL-SERVER
|
|
|
|
|
+ predicates:
|
|
|
|
|
+ - Path=/api/mail/**
|
|
|
|
|
+ filters:
|
|
|
|
|
+ - RewritePath=/api/mail/(?<segment>.*), /$\{segment}
|
|
|
|
|
+ - id: SMS-SERVER
|
|
|
|
|
+ uri: lb://SMS-SERVER
|
|
|
|
|
+ predicates:
|
|
|
|
|
+ - Path=/api/sms/**
|
|
|
|
|
+ filters:
|
|
|
|
|
+ - RewritePath=/api/sms/(?<segment>.*), /$\{segment}
|
|
|
|
|
+ - id: PURCHASE-SERVER
|
|
|
|
|
+ uri: lb://PURCHASE-SERVER
|
|
|
|
|
+ predicates:
|
|
|
|
|
+ - Path=/api/purchase/**
|
|
|
|
|
+ filters:
|
|
|
|
|
+ - RewritePath=/api/purchase/(?<segment>.*), /$\{segment}
|
|
|
|
|
+ - id: SALE-SERVER
|
|
|
|
|
+ uri: lb://SALE-SERVER
|
|
|
|
|
+ predicates:
|
|
|
|
|
+ - Path=/api/sale/**
|
|
|
|
|
+ filters:
|
|
|
|
|
+ - RewritePath=/api/sale/(?<segment>.*), /$\{segment}
|
|
|
|
|
+ - id: STORAGE-SERVER
|
|
|
|
|
+ uri: lb://STORAGE-SERVER
|
|
|
|
|
+ predicates:
|
|
|
|
|
+ - Path=/api/storage/**
|
|
|
|
|
+ filters:
|
|
|
|
|
+ - RewritePath=/api/storage/(?<segment>.*), /$\{segment}
|
|
|
|
|
+ - id: DOCUMENT-SERVER
|
|
|
|
|
+ uri: lb://DOCUMENT-SERVER
|
|
|
|
|
+ predicates:
|
|
|
|
|
+ - Path=/api/document/**
|
|
|
|
|
+ filters:
|
|
|
|
|
+ - RewritePath=/api/document/(?<segment>.*), /$\{segment}
|
|
|
|
|
+ - id: MONEY-SERVER
|
|
|
|
|
+ uri: lb://MONEY-SERVER
|
|
|
|
|
+ predicates:
|
|
|
|
|
+ - Path=/api/money/**
|
|
|
|
|
+ filters:
|
|
|
|
|
+ - RewritePath=/api/money/(?<segment>.*), /$\{segment}
|
|
|
server:
|
|
server:
|
|
|
port: 8560
|
|
port: 8560
|
|
|
tomcat:
|
|
tomcat:
|
|
@@ -38,6 +116,8 @@ eureka:
|
|
|
serviceUrl:
|
|
serviceUrl:
|
|
|
defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@192.168.0.181:8500/eureka/
|
|
defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@192.168.0.181:8500/eureka/
|
|
|
feign:
|
|
feign:
|
|
|
|
|
+ hystrix:
|
|
|
|
|
+ enabled: true
|
|
|
compression:
|
|
compression:
|
|
|
request:
|
|
request:
|
|
|
enabled: true
|
|
enabled: true
|
|
@@ -45,44 +125,21 @@ feign:
|
|
|
min-request-size: 2048
|
|
min-request-size: 2048
|
|
|
response:
|
|
response:
|
|
|
enabled: true
|
|
enabled: true
|
|
|
-zuul:
|
|
|
|
|
- ignored-services: "*" # 忽略eureka上的所有服务
|
|
|
|
|
- sensitive-headers: # 一些比较敏感的请求头,不想通过zuul传递过去, 可以通过该属性进行设置
|
|
|
|
|
- prefix: /api # 公共的前缀
|
|
|
|
|
- routes: # 路由配置
|
|
|
|
|
- ui:
|
|
|
|
|
- path: /ui/**
|
|
|
|
|
- serviceId: ui-server
|
|
|
|
|
- account:
|
|
|
|
|
- path: /account/**
|
|
|
|
|
- serviceId: account-server
|
|
|
|
|
- auth:
|
|
|
|
|
- path: /auth/**
|
|
|
|
|
- serviceId: auth-server
|
|
|
|
|
- file:
|
|
|
|
|
- path: /file/**
|
|
|
|
|
- serviceId: file-server
|
|
|
|
|
- mail:
|
|
|
|
|
- path: /mail/**
|
|
|
|
|
- serviceId: mail-server
|
|
|
|
|
- sms:
|
|
|
|
|
- path: /sms/**
|
|
|
|
|
- serviceId: sms-server
|
|
|
|
|
- purchase:
|
|
|
|
|
- path: /purchase/**
|
|
|
|
|
- serviceId: purchase-server
|
|
|
|
|
- sale:
|
|
|
|
|
- path: /sale/**
|
|
|
|
|
- serviceId: sale-server
|
|
|
|
|
- storage:
|
|
|
|
|
- path: /storage/**
|
|
|
|
|
- serviceId: storage-server
|
|
|
|
|
- document:
|
|
|
|
|
- path: /document/**
|
|
|
|
|
- serviceId: document-server
|
|
|
|
|
- money:
|
|
|
|
|
- path: /money/**
|
|
|
|
|
- serviceId: money-server
|
|
|
|
|
|
|
+hystrix:
|
|
|
|
|
+ command:
|
|
|
|
|
+ default:
|
|
|
|
|
+ execution:
|
|
|
|
|
+ isolation:
|
|
|
|
|
+ thread:
|
|
|
|
|
+ timeoutInMilliseconds: 3000
|
|
|
|
|
+ribbon:
|
|
|
|
|
+ eureka:
|
|
|
|
|
+ enabled: true
|
|
|
|
|
+ ReadTimeout: 60000
|
|
|
|
|
+ ConnectTimeout: 60000
|
|
|
|
|
+ MaxAutoRetries: 0
|
|
|
|
|
+ MaxAutoRetriesNextServer: 1
|
|
|
|
|
+ OkToRetryOnAllOperations: false
|
|
|
info:
|
|
info:
|
|
|
name: '@project.artifactId@'
|
|
name: '@project.artifactId@'
|
|
|
description: '@project.description@'
|
|
description: '@project.description@'
|
|
@@ -95,3 +152,10 @@ auth:
|
|
|
- /api/auth
|
|
- /api/auth
|
|
|
# 忽略全部
|
|
# 忽略全部
|
|
|
- /
|
|
- /
|
|
|
|
|
+logging:
|
|
|
|
|
+ level:
|
|
|
|
|
+ org.springframework.cloud.gateway: debug
|
|
|
|
|
+ org.springframework.http.server.reactive: debug
|
|
|
|
|
+ org.springframework.web.reactive: debug
|
|
|
|
|
+ org.springframework.security: debug
|
|
|
|
|
+ reactor.ipc.netty: debug
|