上传文件至 /

main
木子空间 2025-07-06 21:32:08 +08:00
commit 5ffa94f896
3 changed files with 49 additions and 0 deletions

27
gateway-service.yml Normal file
View File

@ -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

11
product-service.yml Normal file
View File

@ -0,0 +1,11 @@
server:
port: 9002
spring:
application:
name: product-service
eureka:
client:
service-url:
defaultZone: http://localhost:8761/eureka

11
user-service.yml Normal file
View File

@ -0,0 +1,11 @@
server:
port: 9001
spring:
application:
name: user-service
eureka:
client:
service-url:
defaultZone: http://localhost:8761/eureka