Skip to content

Commit

Permalink
《Spring Cloud实战》配套示例代码
Browse files Browse the repository at this point in the history
  • Loading branch information
dyc87112 committed Jan 8, 2017
1 parent 4210abd commit 03df209
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 0 deletions.
60 changes: 60 additions & 0 deletions spring_cloud_in_action/config-repo/api-gateway.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# routes to serviceId
zuul.routes.api-a.path=/api-c/**
zuul.routes.api-a.serviceId=hello-service

zuul.routes.api-b.path=/api-b/**
zuul.routes.api-b.serviceId=hello-service
#zuul.routes.api-b.strip-prefix=true

zuul.routes.api-c.path=/bbb/**
#zuul.routes.api-c.serviceId=hello-service
zuul.routes.api-c.url=http://localhost:8001/

# routes to serviceId£¬'hello-service' is service-name, value is path
#zuul.routes.hello-service=/eee/**

# routes to url
zuul.routes.api-a-url.path=/aaa/**
zuul.routes.api-a-url.serviceId=hello-service

# ribbon with out eureka
#zuul.routes.api-d.path=/ddd/**
#zuul.routes.api-d.serviceId=hello
#ribbon.eureka.enabled=false
#hello.ribbon.listOfServers=http://localhost:8001/,http://localhost:8002/

# route connection
zuul.host.max-per-route-connections=20
zuul.host.max-total-connections=200

# grobal prefix
#zuul.prefix=/api

# grobal strip prefix, default is true(but it has some bugs, when routes path contains zuul.prefix's value)
#zuul.strip-prefix=false

# router strip prefix
#zuul.routes.api-b.strip-prefix=false

# Set of service names not to consider for proxying automatically.
# By default all services in the discovery client will be proxied.
# For example, set zuul.ignored-services=*, then only routes configed by zuul.routes.* will be proxied.
# And default service proxy will disabled.
#zuul.ignored-services=*

# ignored path;
# o.s.c.n.z.f.pre.PreDecorationFilter : No route found for uri: /xxx/yyy/zzz
#zuul.ignored-patterns=/**/hello/**

# timeout setting
#ribbon.ConnectTimeout=3000
#ribbon.ReadTimeout=1000

# fileupload setting
#hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds=10000
#ribbon.ConnectTimeout=3000
#ribbon.ReadTimeout=20000

# Disable Zuul Filters
# zuul.<SimpleClassName>.<filterType>.disable=true
#zuul.AccessFilter.pre.disable=true
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from=git-dev-3.0
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from=git-prod-1.0
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from=git-test-1.0
1 change: 1 addition & 0 deletions spring_cloud_in_action/config-repo/didispace.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from=git-default-1.0

0 comments on commit 03df209

Please sign in to comment.