上传文件至 /
commit
5ffa94f896
|
|
@ -0,0 +1,27 @@
|
|||
server:
|
||||
port: 8888
|
||||
|
||||
spring:
|
||||
application:
|
||||
name: gateway-service
|
||||
|
||||
cloud:
|
||||
gateway:
|
||||
discovery:
|
||||
locator:
|
||||
enabled: true # 允许通过服务名自动路由
|
||||
lower-case-service-id: true
|
||||
routes:
|
||||
- id: user-service
|
||||
uri: lb://user-service
|
||||
predicates:
|
||||
- Path=/users/**
|
||||
- id: product-service
|
||||
uri: lb://product-service
|
||||
predicates:
|
||||
- Path=/products/**
|
||||
|
||||
eureka:
|
||||
client:
|
||||
service-url:
|
||||
defaultZone: http://localhost:8761/eureka
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
server:
|
||||
port: 9002
|
||||
|
||||
spring:
|
||||
application:
|
||||
name: product-service
|
||||
|
||||
eureka:
|
||||
client:
|
||||
service-url:
|
||||
defaultZone: http://localhost:8761/eureka
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
server:
|
||||
port: 9001
|
||||
|
||||
spring:
|
||||
application:
|
||||
name: user-service
|
||||
|
||||
eureka:
|
||||
client:
|
||||
service-url:
|
||||
defaultZone: http://localhost:8761/eureka
|
||||
Loading…
Reference in New Issue