引入nacos支持
All checks were successful
test/timeline-server/pipeline/head This commit looks good

This commit is contained in:
2026-01-05 15:57:02 +08:00
parent 640eb23bde
commit de03f2f9d4
10 changed files with 166 additions and 54 deletions

View File

@@ -2,11 +2,11 @@
spring.application.name=timeline-gateway
server.port=30000
# Nacos配置
spring.cloud.nacos.discovery.server-addr=127.0.0.1:8848
# Nacos配置
spring.cloud.nacos.discovery.server-addr=${NACOS_SERVER_ADDR:127.0.0.1:8848}
spring.cloud.nacos.config.server-addr=${spring.cloud.nacos.discovery.server-addr}
# 使用Nacos服务发现进行路由
# 使用Nacos服务发现进行路由
spring.cloud.gateway.routes[0].id=story-service
spring.cloud.gateway.routes[0].uri=lb://timeline-story
spring.cloud.gateway.routes[0].predicates[0]=Path=/story/**
@@ -27,7 +27,7 @@ spring.cloud.gateway.routes[3].uri=lb://timeline-user
spring.cloud.gateway.routes[3].predicates[0]=Path=/user/**
spring.cloud.gateway.routes[3].filters[0]=StripPrefix=0
# JWT配置
# JWT配置
jwt.secret=6f3f9c2b9d9a4e3f8c0d6a7b5c4e3f1a6f3f9c2b9d9a4e3f8c0d6a7b5c4e3f1a
jwt.expiration=86400
@@ -37,10 +37,10 @@ spring.data.redis.port=36379
spring.data.redis.password=123456
spring.data.redis.timeout=5000
# Actuator配置
# Actuator配置
management.endpoints.web.exposure.include=*
management.endpoint.health.show-details=always
# 日志配置
# 日志配置
logging.level.org.springframework.cloud.gateway=DEBUG
logging.level.com.timeline.gateway=DEBUG