Files
aida-gateway/src/main/resources/application.yml
2026-04-27 11:47:16 +08:00

128 lines
3.9 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# ============================================================
# aida-gateway - 本地配置(不区分环境)
# 公共配置DB、Redis、RabbitMQ、MinIO、API Keys 等)由 Nacos 统一管理
# ============================================================
server:
port: 5569
spring:
application:
name: aida-gateway
cloud:
gateway:
routes:
- id: aida-back
uri: lb://aida-back
predicates:
- Path=/aida/**
filters:
- StripPrefix=1
- id: aida-seller
uri: lb://aida-seller
predicates:
- Path=/seller/**
filters:
- StripPrefix=1
- id: aida-python
uri: http://18.167.251.121:9994
predicates:
- Path=/python/**
# ---------- Knife4j 网关聚合配置 ----------
knife4j:
gateway:
enabled: true
# 手动指定下游服务的文档聚合,可以灵活应对不同服务的 API 版本或路径前缀
strategy: manual
routes:
- name: aida主服务
url: /aida/v3/api-docs
service-name: aida-back
context-path: /aida
order: 1
- name: 商家端服务 (Seller)
url: /seller/v3/api-docs
service-name: aida-seller
context-path: /seller
order: 2
# ---------- Gateway JWT 认证gateway 独有) ----------
gateway:
auth:
jwt-secret: JWTSECRET
jwt-token-header: Authorization
jwt-token-prefix: Bearer-
blacklist-enabled: true
ignore-paths:
# Static resources & docs
- /favicon.ico
- /doc.html
- /swagger-ui.html
- /swagger-ui
- /swagger-ui/**
- /swagger-resources/**
- /v2/api-docs
- /v2/api-docs/**
- /v3/api-docs
- /v3/api-docs/**
- /webjars/**
- /**/v3/api-docs/**
# Actuator & internal
- /actuator/**
- /internal/**
# Account / Login (only /aida prefix)
- /aida/api/account/login
- /aida/api/account/preLogin
- /aida/api/account/sendEmail
- /aida/api/account/noLoginRequired
- /aida/api/account/resetPwd
- /aida/api/account/designWorksRegister
- /aida/api/account/questionnaire
- /aida/api/account/schoolLogin
- /aida/api/account/enterpriseLogin
- /aida/api/account/organizationNameSearch
- /aida/api/account/activateNewEmail
- /aida/api/account/healthy
# Designer
- /aida/api/designer/check
# Python (only /aida prefix)
- /aida/api/python/saveGeneratePicture
- /aida/api/python/getLibraryByUserId
- /aida/api/python/flush
# Third party (exact paths, only /aida prefix)
- /aida/api/third/party/addUser
- /aida/api/third/party/addTrialUser
- /aida/api/third/party/editUser
- /aida/api/third/party/addNoLoginRequiredNew
- /aida/api/third/party/deleteNoLoginRequiredNew
- /aida/api/third/party/updateNoLoginRequiredNew
- /aida/api/third/party/existNoLoginRequired
- /aida/api/third/party/getRedirectUrl
- /aida/api/third/party/auth/google_callback
- /aida/api/third/party/parseGoogleCredential
- /aida/api/third/party/receiveDesignResults
- /aida/api/third/party/parseWeChatCode
- /aida/api/third/party/receiveDesignParams
# Element
- /aida/api/element/initDefaultSysFile
# Portfolio (exact paths, only /aida prefix)
- /aida/api/portfolio/page
- /aida/api/portfolio/detail
- /aida/api/portfolio/commentPage
- /aida/api/portfolio/viewsIncrease
# Global Award
- /aida/api/global-award/**
# LLM stream
- /aida/api/llm/stream
# Payment notifications (only /aida prefix)
- /aida/api/ali-pay/trade/notify
- /aida/api/paypal/ipn/back
- /aida/api/alipay-hk/trade/notify
- /aida/api/stripe/trade/notify
# Notification
- /aida/notification/**
logging:
level:
com.aida.gateway: debug