This commit is contained in:
@@ -1,12 +1,16 @@
|
||||
# application.properties
|
||||
# Application configuration for Gateway service
|
||||
|
||||
# Application name
|
||||
spring.application.name=timeline-gateway
|
||||
|
||||
# Server configuration
|
||||
server.port=30000
|
||||
|
||||
# æ¶åºé
ç½®
|
||||
# Timezone configuration
|
||||
spring.jackson.time-zone=GMT+8
|
||||
spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
|
||||
|
||||
# UTF-8编码配置
|
||||
# UTF-8 encoding configuration to ensure proper Chinese character handling
|
||||
logging.charset.console=UTF-8
|
||||
logging.charset.file=UTF-8
|
||||
server.tomcat.uri-encoding=UTF-8
|
||||
@@ -14,47 +18,54 @@ server.servlet.encoding.charset=UTF-8
|
||||
server.servlet.encoding.enabled=true
|
||||
server.servlet.encoding.force=true
|
||||
|
||||
# æ¥å¿é
ç½®
|
||||
# Logging configuration
|
||||
logging.level.org.springframework.cloud.gateway=DEBUG
|
||||
logging.level.com.timeline.gateway=DEBUG
|
||||
logging.pattern.console=%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
|
||||
logging.pattern.file=%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
|
||||
|
||||
# Nacos configuration - commented out to use environment variables
|
||||
#spring.cloud.nacos.discovery.server-addr=${NACOS_SERVER_ADDR:127.0.0.1:8848}
|
||||
#spring.cloud.nacos.config.enabled=false
|
||||
|
||||
# 使ç¨Nacosè¿è¡æå¡åç°
|
||||
# Gateway routes configuration for different services
|
||||
# Story service route
|
||||
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/**
|
||||
spring.cloud.gateway.routes[0].filters[0]=StripPrefix=0
|
||||
|
||||
# File service route
|
||||
spring.cloud.gateway.routes[1].id=file-service
|
||||
spring.cloud.gateway.routes[1].uri=lb://timeline-file
|
||||
spring.cloud.gateway.routes[1].predicates[0]=Path=/file/**
|
||||
spring.cloud.gateway.routes[1].filters[0]=StripPrefix=0
|
||||
|
||||
# User service WebSocket route
|
||||
spring.cloud.gateway.routes[2].id=user-service-ws
|
||||
spring.cloud.gateway.routes[2].uri=lb://timeline-user
|
||||
spring.cloud.gateway.routes[2].predicates[0]=Path=/user/ws/**
|
||||
spring.cloud.gateway.routes[2].filters[0]=StripPrefix=0
|
||||
|
||||
# User service route
|
||||
spring.cloud.gateway.routes[3].id=user-service
|
||||
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 configuration
|
||||
jwt.secret=6f3f9c2b9d9a4e3f8c0d6a7b5c4e3f1a6f3f9c2b9d9a4e3f8c0d6a7b5c4e3f1a
|
||||
jwt.expiration=86400
|
||||
|
||||
# Redis
|
||||
# Redis configuration
|
||||
spring.data.redis.host=localhost
|
||||
spring.data.redis.port=36379
|
||||
spring.data.redis.password=123456
|
||||
spring.data.redis.timeout=5000
|
||||
|
||||
# Actuatoré
ç½®
|
||||
# Actuator configuration for monitoring
|
||||
management.endpoints.web.exposure.include=*
|
||||
management.endpoint.health.show-details=always
|
||||
|
||||
# ç½å
³é
ç½®
|
||||
spring.cloud.gateway.discovery.locator.enabled=true
|
||||
# Gateway discovery locator configuration - enables route discovery via service registry
|
||||
spring.cloud.gateway.discovery.locator.enabled=true
|
||||
Reference in New Issue
Block a user