This commit is contained in:
jiangh277
2025-12-24 14:17:19 +08:00
parent 3eb445291f
commit 4c7d59f87b
89 changed files with 3525 additions and 311 deletions

View File

@@ -1,27 +1,48 @@
# application.properties
spring.application.name=timeline-gateway
server.port=30000
# ????
spring.datasource.url=jdbc:mysql://59.80.22.43:33306/timeline?serverTimezone=UTC&allowPublicKeyRetrieval=true
spring.datasource.username=root
spring.datasource.password=WoCloud@9ol7uj
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
# 路由配置
spring.cloud.gateway.routes[0].id=story-service
spring.cloud.gateway.routes[0].uri=lb://timeline.story
spring.cloud.gateway.routes[0].uri=http://localhost:30001
spring.cloud.gateway.routes[0].predicates[0]=Path=/story/**
spring.cloud.gateway.routes[0].filters[0]=StripPrefix=1
spring.cloud.gateway.routes[0].filters[0]=StripPrefix=0
spring.cloud.gateway.routes[1].id=file-service
spring.cloud.gateway.routes[1].uri=lb://timeline.file
spring.cloud.gateway.routes[1].uri=http://localhost:30002
spring.cloud.gateway.routes[1].predicates[0]=Path=/file/**
spring.cloud.gateway.routes[1].filters[0]=StripPrefix=1
spring.cloud.gateway.routes[1].filters[0]=StripPrefix=0
# JWT??
jwt.secret=timelineSecretKey
spring.cloud.gateway.routes[2].id=user-service
spring.cloud.gateway.routes[2].uri=http://localhost:30003
spring.cloud.gateway.routes[2].predicates[0]=Path=/user/**
spring.cloud.gateway.routes[2].filters[0]=StripPrefix=0
# 添加WebSocket路由配置
spring.cloud.gateway.routes[3].id=user-service-ws
spring.cloud.gateway.routes[3].uri=http://localhost:30003
spring.cloud.gateway.routes[3].predicates[0]=Path=/user/ws/**
spring.cloud.gateway.routes[3].filters[0]=StripPrefix=0
# JWT配置
jwt.secret=6f3f9c2b9d9a4e3f8c0d6a7b5c4e3f1a6f3f9c2b9d9a4e3f8c0d6a7b5c4e3f1a
jwt.expiration=86400
# Actuator??
# Redis
spring.data.redis.host=localhost
spring.data.redis.port=36379
spring.data.redis.password=123456
spring.data.redis.timeout=5000
# 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
logging.level.com.timeline.gateway=DEBUG