暂存提交
This commit is contained in:
@@ -0,0 +1,95 @@
|
||||
spring:
|
||||
config:
|
||||
activate:
|
||||
on-profile: cn
|
||||
cloud:
|
||||
gateway:
|
||||
discovery:
|
||||
locator:
|
||||
enabled: false
|
||||
routes:
|
||||
- id: auth-service
|
||||
uri: lb://auth-service
|
||||
predicates: [Path=/api/auth/**]
|
||||
- id: iam-service
|
||||
uri: lb://iam-service
|
||||
predicates: ["Path=/api/iam/**,/api/platform/v1/iam/**,/api/merchant/v1/iam/**"]
|
||||
- id: order-service
|
||||
uri: lb://order-service
|
||||
predicates: ["Path=/api/merchant/v1/orders/**,/api/platform/v1/orders/**"]
|
||||
- id: firstleg-service
|
||||
uri: lb://firstleg-service
|
||||
predicates: ["Path=/api/merchant/v1/first-leg/**,/api/platform/v1/first-leg/**"]
|
||||
- id: warehouse-service
|
||||
uri: lb://warehouse-service
|
||||
predicates: ["Path=/api/merchant/v1/warehouses/**,/api/merchant/v1/partners/**,/api/platform/v1/warehouses/**,/api/platform/v1/warehouse-admin/**"]
|
||||
- id: file-service
|
||||
uri: lb://file-service
|
||||
predicates: ["Path=/api/merchant/v1/files/**,/api/platform/v1/files/**"]
|
||||
- id: print-service
|
||||
uri: lb://print-service
|
||||
predicates: ["Path=/api/merchant/v1/print/**,/api/platform/v1/print/**"]
|
||||
- id: auth-openapi
|
||||
uri: lb://auth-service
|
||||
predicates: [Path=/auth-service/v3/api-docs/**]
|
||||
filters: [StripPrefix=1]
|
||||
- id: iam-openapi
|
||||
uri: lb://iam-service
|
||||
predicates: [Path=/iam-service/v3/api-docs/**]
|
||||
filters: [StripPrefix=1]
|
||||
- id: order-openapi
|
||||
uri: lb://order-service
|
||||
predicates: [Path=/order-service/v3/api-docs/**]
|
||||
filters: [StripPrefix=1]
|
||||
- id: firstleg-openapi
|
||||
uri: lb://firstleg-service
|
||||
predicates: [Path=/firstleg-service/v3/api-docs/**]
|
||||
filters: [StripPrefix=1]
|
||||
- id: warehouse-openapi
|
||||
uri: lb://warehouse-service
|
||||
predicates: [Path=/warehouse-service/v3/api-docs/**]
|
||||
filters: [StripPrefix=1]
|
||||
- id: file-openapi
|
||||
uri: lb://file-service
|
||||
predicates: [Path=/file-service/v3/api-docs/**]
|
||||
filters: [StripPrefix=1]
|
||||
- id: print-openapi
|
||||
uri: lb://print-service
|
||||
predicates: [Path=/print-service/v3/api-docs/**]
|
||||
filters: [StripPrefix=1]
|
||||
- id: audit-openapi
|
||||
uri: lb://audit-service
|
||||
predicates: [Path=/audit-service/v3/api-docs/**]
|
||||
filters: [StripPrefix=1]
|
||||
- id: integration-openapi
|
||||
uri: lb://integration-service
|
||||
predicates: [Path=/integration-service/v3/api-docs/**]
|
||||
filters: [StripPrefix=1]
|
||||
- id: event-bridge-openapi
|
||||
uri: lb://event-bridge-service
|
||||
predicates: [Path=/event-bridge-service/v3/api-docs/**]
|
||||
filters: [StripPrefix=1]
|
||||
|
||||
baiyue:
|
||||
deployment:
|
||||
region-code: ${REGION_CODE:CN}
|
||||
cell: ${DEPLOYMENT_CELL:prod-cn}
|
||||
data-residency: ${DATA_RESIDENCY:CN}
|
||||
|
||||
springdoc:
|
||||
swagger-ui:
|
||||
urls:
|
||||
- { name: auth-platform, url: /auth-service/v3/api-docs/platform }
|
||||
- { name: iam-platform, url: /iam-service/v3/api-docs/platform }
|
||||
- { name: iam-merchant, url: /iam-service/v3/api-docs/merchant }
|
||||
- { name: order-platform, url: /order-service/v3/api-docs/platform }
|
||||
- { name: order-merchant, url: /order-service/v3/api-docs/merchant }
|
||||
- { name: firstleg-platform, url: /firstleg-service/v3/api-docs/platform }
|
||||
- { name: warehouse-merchant, url: /warehouse-service/v3/api-docs/merchant }
|
||||
- { name: warehouse-platform, url: /warehouse-service/v3/api-docs/platform }
|
||||
- { name: file-platform, url: /file-service/v3/api-docs/platform }
|
||||
- { name: file-merchant, url: /file-service/v3/api-docs/merchant }
|
||||
- { name: print-platform, url: /print-service/v3/api-docs/platform }
|
||||
- { name: audit, url: /audit-service/v3/api-docs }
|
||||
- { name: integration, url: /integration-service/v3/api-docs }
|
||||
- { name: event-bridge, url: /event-bridge-service/v3/api-docs }
|
||||
@@ -0,0 +1,133 @@
|
||||
server:
|
||||
port: ${GATEWAY_PORT:9000}
|
||||
|
||||
spring:
|
||||
profiles:
|
||||
default: cn
|
||||
application:
|
||||
name: gateway
|
||||
autoconfigure:
|
||||
exclude:
|
||||
- org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
|
||||
config:
|
||||
import:
|
||||
- optional:nacos:baiyue-common.yml?group=BAIYUE&refreshEnabled=true
|
||||
- optional:nacos:${spring.application.name}.yml?group=BAIYUE&refreshEnabled=true
|
||||
data:
|
||||
redis:
|
||||
host: ${REDIS_HOST:127.0.0.1}
|
||||
port: ${REDIS_PORT:6379}
|
||||
password: ${REDIS_PASSWORD:}
|
||||
database: ${REDIS_DATABASE:0}
|
||||
timeout: ${REDIS_TIMEOUT:3s}
|
||||
cloud:
|
||||
nacos:
|
||||
server-addr: ${NACOS_SERVER_ADDR:127.0.0.1:8848}
|
||||
username: ${NACOS_USERNAME:nacos}
|
||||
password: ${NACOS_PASSWORD:nacos}
|
||||
discovery:
|
||||
enabled: ${NACOS_DISCOVERY_ENABLED:true}
|
||||
register-enabled: ${NACOS_REGISTER_ENABLED:true}
|
||||
group: ${NACOS_GROUP:BAIYUE}
|
||||
namespace: ${NACOS_NAMESPACE:public}
|
||||
config:
|
||||
namespace: ${NACOS_NAMESPACE:public}
|
||||
gateway:
|
||||
discovery:
|
||||
locator:
|
||||
enabled: true
|
||||
lower-case-service-id: true
|
||||
routes:
|
||||
- id: auth-service
|
||||
uri: lb://auth-service
|
||||
predicates:
|
||||
- Path=/api/auth/**
|
||||
- id: iam-service
|
||||
uri: lb://iam-service
|
||||
predicates:
|
||||
- Path=/api/iam/**,/api/platform/v1/iam/**,/api/merchant/v1/iam/**
|
||||
- id: order-service
|
||||
uri: lb://order-service
|
||||
predicates:
|
||||
- Path=/api/merchant/v1/orders/**,/api/platform/v1/orders/**
|
||||
- id: warehouse-service
|
||||
uri: lb://warehouse-service
|
||||
predicates:
|
||||
- Path=/api/merchant/v1/warehouses/**,/api/platform/v1/warehouses/**,/api/platform/v1/warehouse-admin/**
|
||||
- id: file-service
|
||||
uri: lb://file-service
|
||||
predicates:
|
||||
- Path=/api/merchant/v1/files/**,/api/platform/v1/files/**
|
||||
- id: print-service
|
||||
uri: lb://print-service
|
||||
predicates:
|
||||
- Path=/api/merchant/v1/print/**,/api/platform/v1/print/**
|
||||
- id: firstleg-service
|
||||
uri: lb://firstleg-service
|
||||
predicates:
|
||||
- Path=/api/merchant/v1/first-leg/**,/api/platform/v1/first-leg/**
|
||||
baiyue:
|
||||
cors:
|
||||
allowed-origins: ${CORS_ALLOWED_ORIGINS:http://localhost:5173,http://localhost:5174,http://127.0.0.1:5173,http://127.0.0.1:5174}
|
||||
allowed-methods: GET,POST,PUT,PATCH,DELETE,OPTIONS
|
||||
allowed-headers: Authorization,Content-Type,Accept,X-Requested-With,X-Request-Id,Idempotency-Key
|
||||
exposed-headers: X-Request-Id,X-Trace-Id,Location,Content-Disposition
|
||||
allow-credentials: ${CORS_ALLOW_CREDENTIALS:false}
|
||||
max-age: ${CORS_MAX_AGE:3600}
|
||||
security:
|
||||
jwt-secret: ${JWT_SECRET:change-me-to-at-least-32-bytes-long-before-start}
|
||||
token-key-prefix: ${REDIS_TOKEN_KEY_PREFIX:baiyue:auth}
|
||||
permit-paths:
|
||||
- /api/auth/login
|
||||
- /api/auth/register
|
||||
- /api/auth/refresh
|
||||
- /actuator/health
|
||||
- /swagger-ui/**
|
||||
- /swagger-ui.html
|
||||
- /webjars/**
|
||||
- /v3/api-docs/**
|
||||
- /auth-service/v3/api-docs/**
|
||||
- /iam-service/v3/api-docs/**
|
||||
- /order-service/v3/api-docs/**
|
||||
- /warehouse-service/v3/api-docs/**
|
||||
- /file-service/v3/api-docs/**
|
||||
- /print-service/v3/api-docs/**
|
||||
- /firstleg-service/v3/api-docs/**
|
||||
|
||||
management:
|
||||
endpoints:
|
||||
web:
|
||||
exposure:
|
||||
include: health,info,prometheus
|
||||
endpoint:
|
||||
health:
|
||||
probes:
|
||||
enabled: true
|
||||
|
||||
springdoc:
|
||||
api-docs.enabled: ${SWAGGER_ENABLED:false}
|
||||
swagger-ui:
|
||||
enabled: ${SWAGGER_ENABLED:false}
|
||||
urls:
|
||||
- name: auth-platform
|
||||
url: /auth-service/v3/api-docs/platform
|
||||
- name: iam-platform
|
||||
url: /iam-service/v3/api-docs/platform
|
||||
- name: iam-merchant
|
||||
url: /iam-service/v3/api-docs/merchant
|
||||
- name: order-platform
|
||||
url: /order-service/v3/api-docs/platform
|
||||
- name: order-merchant
|
||||
url: /order-service/v3/api-docs/merchant
|
||||
- name: warehouse-merchant
|
||||
url: /warehouse-service/v3/api-docs/merchant
|
||||
- name: warehouse-platform
|
||||
url: /warehouse-service/v3/api-docs/platform
|
||||
- name: file-platform
|
||||
url: /file-service/v3/api-docs/platform
|
||||
- name: file-merchant
|
||||
url: /file-service/v3/api-docs/merchant
|
||||
- name: print-platform
|
||||
url: /print-service/v3/api-docs/platform
|
||||
- name: firstleg-platform
|
||||
url: /firstleg-service/v3/api-docs/platform
|
||||
Reference in New Issue
Block a user