Files
happy-life-star/backend/emotion-gateway/target/classes/application-prod.yml
T

106 lines
2.6 KiB
YAML

server:
port: 9000
spring:
application:
name: emotion-gateway
autoconfigure:
exclude:
- org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
- org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration
- com.baomidou.mybatisplus.autoconfigure.MybatisPlusAutoConfiguration
data:
redis:
host: ${REDIS_HOST:localhost}
port: ${REDIS_PORT:6379}
database: 0
timeout: 3000ms
lettuce:
pool:
max-active: 20
max-idle: 10
min-idle: 5
max-wait: 3000ms
cloud:
nacos:
discovery:
server-addr: ${NACOS_SERVER_ADDR:localhost:8848}
namespace: public
group: DEFAULT_GROUP
enabled: true
ip: ${SERVER_IP:localhost}
metadata:
version: 1.0.0
environment: prod
config:
enabled: false
gateway:
discovery:
locator:
enabled: true
lower-case-service-id: true
routes:
# 用户服务路由
- id: emotion-user
uri: lb://emotion-user
predicates:
- Path=/api/user/**
# AI服务路由
- id: emotion-ai
uri: lb://emotion-ai
predicates:
- Path=/api/ai/**
# 记录服务路由
- id: emotion-record
uri: lb://emotion-record
predicates:
- Path=/api/record/**
filters:
- StripPrefix=1
# 成长服务路由
- id: emotion-growth
uri: lb://emotion-growth
predicates:
- Path=/api/growth/**
filters:
- StripPrefix=1
# 探索服务路由
- id: emotion-explore
uri: lb://emotion-explore
predicates:
- Path=/api/explore/**
filters:
- StripPrefix=1
# 奖励服务路由
- id: emotion-reward
uri: lb://emotion-reward
predicates:
- Path=/api/reward/**
filters:
- StripPrefix=1
# 统计服务路由
- id: emotion-stats
uri: lb://emotion-stats
predicates:
- Path=/api/stats/**
filters:
- StripPrefix=1
# 日志配置
logging:
level:
com.emotionmuseum: INFO
org.springframework.cloud.gateway: DEBUG
pattern:
console: "%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n"
# 管理端点
management:
endpoints:
web:
exposure:
include: health,info,gateway
endpoint:
health:
show-details: always