优化
This commit is contained in:
@@ -1,5 +0,0 @@
|
||||
# 国内 Nacos 配置
|
||||
|
||||
将本目录文件按原文件名作为 Data ID 发布到 `prod-cn` 命名空间和 `BAIYUE` 分组。配置只引用环境变量,不保存密码或访问密钥。Gateway 必须同时启用 `cn` Profile。
|
||||
|
||||
尾程配置不进入本仓库;头程和尾程只通过跨区域事件桥协作。
|
||||
@@ -1,17 +0,0 @@
|
||||
spring:
|
||||
datasource:
|
||||
url: ${AUTH_DB_URL}
|
||||
username: ${AUTH_DB_USERNAME}
|
||||
password: ${AUTH_DB_PASSWORD}
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
baiyue:
|
||||
security:
|
||||
access-token-ttl: ${ACCESS_TOKEN_TTL:24m}
|
||||
refresh-token-ttl: ${REFRESH_TOKEN_TTL:7d}
|
||||
overseas-jwt:
|
||||
enabled: ${OVERSEAS_JWT_ENABLED:true}
|
||||
issuer: ${OVERSEAS_JWT_ISSUER:auth-service}
|
||||
audience: ${OVERSEAS_JWT_AUDIENCE:lastleg-api}
|
||||
rsa-jwk-set: ${OVERSEAS_JWT_RSA_JWK_SET:}
|
||||
current-kid: ${OVERSEAS_JWT_CURRENT_KID:}
|
||||
access-token-ttl: ${OVERSEAS_ACCESS_TOKEN_TTL:15m}
|
||||
@@ -1,15 +0,0 @@
|
||||
spring:
|
||||
datasource:
|
||||
url: ${EVENT_BRIDGE_DB_URL}
|
||||
username: ${EVENT_BRIDGE_DB_USERNAME}
|
||||
password: ${EVENT_BRIDGE_DB_PASSWORD}
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
baiyue:
|
||||
region: ${REGION_CODE:CN}
|
||||
deployment-cell: ${DEPLOYMENT_CELL:prod-cn}
|
||||
data-residency: ${DATA_RESIDENCY:CN}
|
||||
event-dispatcher:
|
||||
consumer-url: ${EVENT_CONSUMER_URL:http://firstleg:9202/internal/firstleg/v1/container-events}
|
||||
firstleg-consumer-url: ${FIRSTLEG_CONTAINER_EVENT_CONSUMER_URL:http://firstleg:9202/internal/firstleg/v1/container-events}
|
||||
finance-consumer-url: ${FINANCE_FEE_EVENT_CONSUMER_URL:http://finance:9203/internal/finance/v1/business-fee-source-events}
|
||||
finance-wallet-consumer-url: ${FINANCE_WALLET_EVENT_CONSUMER_URL:http://finance:9203/internal/finance/v1/wallet-command-events}
|
||||
@@ -1,9 +0,0 @@
|
||||
spring:
|
||||
datasource:
|
||||
url: ${FINANCE_DB_URL}
|
||||
username: ${FINANCE_DB_USERNAME}
|
||||
password: ${FINANCE_DB_PASSWORD}
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
baiyue.clients.warehouse.url: ${WAREHOUSE_SERVICE_URL:}
|
||||
baiyue.finance.recharge.qr-code-url: ${FINANCE_RECHARGE_QR_CODE_URL:}
|
||||
baiyue.finance.wallet.default-credit-limit: ${FINANCE_WALLET_DEFAULT_CREDIT_LIMIT:0.00}
|
||||
@@ -1,37 +0,0 @@
|
||||
# 头程本地 Nacos 配置
|
||||
|
||||
本目录配置用于本机开发环境,发布目标为 `public` 命名空间和 `BAIYUE` 分组。
|
||||
|
||||
配置通过环境变量保留覆盖能力,并提供当前本机可直接启动的默认地址。生产环境必须使用 `config/nacos/cn`,不得使用本目录中的本地密码和本地密钥。
|
||||
|
||||
发布命令:
|
||||
|
||||
```powershell
|
||||
powershell -ExecutionPolicy Bypass -File D:\baiyue-firstleg\scripts\publish-local-nacos-config.ps1
|
||||
```
|
||||
|
||||
也可以使用统一入口;`local` 会被强制限制在 `public` namespace:
|
||||
|
||||
```powershell
|
||||
powershell -ExecutionPolicy Bypass -File D:\baiyue-firstleg\scripts\publish-nacos-config.ps1 -Environment local
|
||||
```
|
||||
|
||||
配置发布成功后,各服务仍由自身的 Nacos Discovery 配置在启动时自动注册,不需要手工创建服务实例。
|
||||
|
||||
本地海外链路也发布在同一 `public / BAIYUE` 作用域,包括
|
||||
`gateway-overseas.yml`、`lastleg-service.yml` 和
|
||||
`warehouse-overseas-service.yml`。这些配置默认通过 `127.0.0.1` 连接本机
|
||||
Auth、国内仓库、文件和海外服务;需要跨主机运行时使用对应环境变量覆盖。
|
||||
|
||||
## MyBatis SQL 日志
|
||||
|
||||
本地公共配置使用 MyBatis `Slf4jImpl`,数据库服务的 Mapper 日志级别默认为 `DEBUG`。执行数据库操作时,控制台会打印 SQL 模板、参数和影响行数。
|
||||
|
||||
可通过环境变量统一调整:
|
||||
|
||||
```powershell
|
||||
$env:MYBATIS_SQL_LOG_LEVEL = "INFO" # 关闭 SQL 明细
|
||||
$env:MYBATIS_SQL_LOG_LEVEL = "DEBUG" # 打开 SQL 明细
|
||||
```
|
||||
|
||||
修改后重新发布本地 Nacos 配置并重启相关服务。SQL 参数可能包含业务数据,该设置只用于本地开发,不得复制到测试或生产环境。
|
||||
@@ -1,5 +0,0 @@
|
||||
spring.datasource:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: ${AUDIT_DB_URL:jdbc:mysql://127.0.0.1:3306/baiyue_audit?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true}
|
||||
username: ${AUDIT_DB_USERNAME:root}
|
||||
password: ${AUDIT_DB_PASSWORD:123456}
|
||||
@@ -1,15 +0,0 @@
|
||||
spring.datasource:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: ${AUTH_DB_URL:jdbc:mysql://127.0.0.1:3306/baiyue_auth?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true}
|
||||
username: ${AUTH_DB_USERNAME:root}
|
||||
password: ${AUTH_DB_PASSWORD:123456}
|
||||
|
||||
baiyue:
|
||||
security:
|
||||
overseas-jwt:
|
||||
enabled: ${OVERSEAS_JWT_ENABLED:true}
|
||||
issuer: ${OVERSEAS_JWT_ISSUER:auth-service}
|
||||
audience: ${OVERSEAS_JWT_AUDIENCE:lastleg-api}
|
||||
rsa-jwk-set: ${OVERSEAS_JWT_RSA_JWK_SET:}
|
||||
current-kid: ${OVERSEAS_JWT_CURRENT_KID:}
|
||||
access-token-ttl: ${OVERSEAS_ACCESS_TOKEN_TTL:15m}
|
||||
@@ -1,73 +0,0 @@
|
||||
baiyue:
|
||||
deployment:
|
||||
region-code: ${REGION_CODE:CN}
|
||||
cell: ${DEPLOYMENT_CELL:local-cn}
|
||||
data-residency: ${DATA_RESIDENCY:CN}
|
||||
security:
|
||||
jwt-secret: ${JWT_SECRET:change-me-to-at-least-32-bytes-long-before-start}
|
||||
issuer: ${JWT_ISSUER:auth-service}
|
||||
internal-service-token: ${INTERNAL_SERVICE_TOKEN:phase1-local-internal-token-at-least-32-bytes}
|
||||
token-key-prefix: ${REDIS_TOKEN_KEY_PREFIX:baiyue:auth}
|
||||
warehouse:
|
||||
public-tenant-id: 0
|
||||
openapi.enabled: ${SWAGGER_ENABLED:true}
|
||||
audit:
|
||||
enabled: true
|
||||
endpoint: ${AUDIT_SERVICE_URL:http://127.0.0.1:9700}/internal/audit/events
|
||||
outbox:
|
||||
enabled: ${AUDIT_OUTBOX_ENABLED:false}
|
||||
publisher-enabled: ${AUDIT_OUTBOX_PUBLISHER_ENABLED:false}
|
||||
batch-size: ${AUDIT_OUTBOX_BATCH_SIZE:50}
|
||||
lease-seconds: ${AUDIT_OUTBOX_LEASE_SECONDS:60}
|
||||
max-attempts: ${AUDIT_OUTBOX_MAX_ATTEMPTS:5}
|
||||
max-compensations: ${AUDIT_OUTBOX_MAX_COMPENSATIONS:2}
|
||||
compensation-delay-minutes: ${AUDIT_OUTBOX_COMPENSATION_DELAY_MINUTES:30}
|
||||
retention-days: ${AUDIT_OUTBOX_RETENTION_DAYS:30}
|
||||
rocketmq:
|
||||
topic: ${MQ_TOPIC_PREFIX:test-}baiyue-audit-event-v1
|
||||
send-timeout-ms: ${AUDIT_MQ_SEND_TIMEOUT_MS:3000}
|
||||
spring:
|
||||
jackson:
|
||||
default-property-inclusion: non_null
|
||||
deserialization.fail-on-unknown-properties: false
|
||||
serialization.write-dates-as-timestamps: false
|
||||
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.discovery:
|
||||
# Local services must stay reachable through the gateway when VPN adapters change priority.
|
||||
ip: ${NACOS_DISCOVERY_IP:127.0.0.1}
|
||||
group: ${NACOS_GROUP:BAIYUE}
|
||||
namespace: ${NACOS_NAMESPACE:public}
|
||||
openfeign:
|
||||
circuitbreaker.enabled: true
|
||||
client.config.default:
|
||||
connect-timeout: 3000
|
||||
read-timeout: 5000
|
||||
server:
|
||||
shutdown: graceful
|
||||
max-http-request-header-size: ${SERVER_MAX_HTTP_REQUEST_HEADER_SIZE:32KB}
|
||||
management:
|
||||
endpoints.web.exposure.include: health,info,prometheus
|
||||
endpoint.health:
|
||||
probes.enabled: true
|
||||
show-details: always
|
||||
mybatis-plus:
|
||||
configuration:
|
||||
map-underscore-to-camel-case: true
|
||||
call-setters-on-nulls: true
|
||||
global-config:
|
||||
banner: false
|
||||
db-config:
|
||||
id-type: assign_id
|
||||
logic-delete-field: deleted
|
||||
logic-delete-value: 1
|
||||
logic-not-delete-value: 0
|
||||
springdoc:
|
||||
api-docs.enabled: ${SWAGGER_ENABLED:true}
|
||||
swagger-ui.enabled: ${SWAGGER_ENABLED:true}
|
||||
@@ -1,11 +0,0 @@
|
||||
spring.datasource:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: ${EVENT_BRIDGE_DB_URL:jdbc:mysql://127.0.0.1:3306/baiyue_event_bridge?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai&useSSL=false&allowPublicKeyRetrieval=true}
|
||||
username: ${EVENT_BRIDGE_DB_USERNAME:root}
|
||||
password: ${EVENT_BRIDGE_DB_PASSWORD:123456}
|
||||
baiyue:
|
||||
region: ${REGION_CODE:CN}
|
||||
event-bridge:
|
||||
accept-any-region: ${EVENT_BRIDGE_ACCEPT_ANY_REGION:true}
|
||||
deployment-cell: ${DEPLOYMENT_CELL:local-cn}
|
||||
data-residency: ${DATA_RESIDENCY:CN}
|
||||
@@ -1,123 +0,0 @@
|
||||
spring.datasource:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: ${FILE_DB_URL:jdbc:mysql://127.0.0.1:3306/baiyue_file?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true}
|
||||
username: ${FILE_DB_USERNAME:root}
|
||||
password: ${FILE_DB_PASSWORD:123456}
|
||||
baiyue.file.storage-root: ${FILE_STORAGE_ROOT:D:/baiyue-firstleg-runtime/uploads}
|
||||
baiyue:
|
||||
file:
|
||||
export:
|
||||
definitions:
|
||||
CUSTOMER_LIST:
|
||||
provider-service: iam-service
|
||||
provider-path: /internal/exports/v1/CUSTOMER_LIST/batches
|
||||
required-permission: platform:customer:export
|
||||
app-scope: PLATFORM
|
||||
enabled: true
|
||||
max-rows: 200000
|
||||
max-attempts: 3
|
||||
batch-size: 500
|
||||
|
||||
DOMESTIC_WAREHOUSE_ORDER_LIST:
|
||||
provider-service: order-service
|
||||
provider-path: /internal/exports/v1/DOMESTIC_WAREHOUSE_ORDER_LIST/batches
|
||||
required-permission: platform:order:export
|
||||
app-scope: PLATFORM
|
||||
enabled: true
|
||||
max-rows: 200000
|
||||
max-attempts: 3
|
||||
batch-size: 200
|
||||
|
||||
LOADING_LIST_BUY_DECLARATION_ITEMS:
|
||||
provider-service: firstleg-service
|
||||
provider-path: /internal/exports/v1/LOADING_LIST_BUY_DECLARATION_ITEMS/batches
|
||||
required-permission: platform:firstleg:customs:manage
|
||||
app-scope: PLATFORM
|
||||
enabled: true
|
||||
max-rows: 200000
|
||||
max-attempts: 3
|
||||
batch-size: 500
|
||||
|
||||
FINANCE_CUSTOMER_ACCOUNT_LIST:
|
||||
provider-service: finance-service
|
||||
provider-path: /internal/exports/v1/FINANCE_CUSTOMER_ACCOUNT_LIST/batches
|
||||
required-permission: platform:finance:customer-account:export
|
||||
app-scope: PLATFORM
|
||||
enabled: true
|
||||
max-rows: 200000
|
||||
max-attempts: 3
|
||||
batch-size: 500
|
||||
FINANCE_CUSTOMER_ACCOUNT_LEDGER:
|
||||
provider-service: finance-service
|
||||
provider-path: /internal/exports/v1/FINANCE_CUSTOMER_ACCOUNT_LEDGER/batches
|
||||
required-permission: platform:finance:customer-account:export
|
||||
app-scope: PLATFORM
|
||||
enabled: true
|
||||
max-rows: 200000
|
||||
max-attempts: 3
|
||||
batch-size: 500
|
||||
FINANCE_FEE_SOURCE_LIST:
|
||||
provider-service: finance-service
|
||||
provider-path: /internal/exports/v1/FINANCE_FEE_SOURCE_LIST/batches
|
||||
required-permission: platform:finance:customer-arap:export
|
||||
app-scope: PLATFORM
|
||||
enabled: true
|
||||
max-rows: 200000
|
||||
max-attempts: 3
|
||||
batch-size: 500
|
||||
FINANCE_RECONCILIATION_STATEMENT_LIST:
|
||||
provider-service: finance-service
|
||||
provider-path: /internal/exports/v1/FINANCE_RECONCILIATION_STATEMENT_LIST/batches
|
||||
required-permission: platform:finance:customer-statement:export
|
||||
app-scope: PLATFORM
|
||||
enabled: true
|
||||
max-rows: 200000
|
||||
max-attempts: 3
|
||||
batch-size: 500
|
||||
FINANCE_RECEIVABLE_SETTLEMENT_LIST:
|
||||
provider-service: finance-service
|
||||
provider-path: /internal/exports/v1/FINANCE_RECEIVABLE_SETTLEMENT_LIST/batches
|
||||
required-permission: platform:finance:settlement-ar:export
|
||||
app-scope: PLATFORM
|
||||
enabled: true
|
||||
max-rows: 200000
|
||||
max-attempts: 3
|
||||
batch-size: 500
|
||||
FINANCE_RECEIVABLE_SETTLEMENT_DETAIL:
|
||||
provider-service: finance-service
|
||||
provider-path: /internal/exports/v1/FINANCE_RECEIVABLE_SETTLEMENT_DETAIL/batches
|
||||
required-permission: platform:finance:settlement-ar:export
|
||||
app-scope: PLATFORM
|
||||
enabled: true
|
||||
max-rows: 200000
|
||||
max-attempts: 3
|
||||
batch-size: 500
|
||||
FINANCE_PAYABLE_SETTLEMENT_LIST:
|
||||
provider-service: finance-service
|
||||
provider-path: /internal/exports/v1/FINANCE_PAYABLE_SETTLEMENT_LIST/batches
|
||||
required-permission: platform:finance:settlement-ap:export
|
||||
app-scope: PLATFORM
|
||||
enabled: true
|
||||
max-rows: 200000
|
||||
max-attempts: 3
|
||||
batch-size: 500
|
||||
FINANCE_PAYABLE_SETTLEMENT_DETAIL:
|
||||
provider-service: finance-service
|
||||
provider-path: /internal/exports/v1/FINANCE_PAYABLE_SETTLEMENT_DETAIL/batches
|
||||
required-permission: platform:finance:settlement-ap:export
|
||||
app-scope: PLATFORM
|
||||
enabled: true
|
||||
max-rows: 200000
|
||||
max-attempts: 3
|
||||
batch-size: 500
|
||||
FINANCE_RECEIVABLE_STATISTICS:
|
||||
provider-service: finance-service
|
||||
provider-path: /internal/exports/v1/FINANCE_RECEIVABLE_STATISTICS/batches
|
||||
required-permission: platform:finance:receivable-statistics:export
|
||||
app-scope: PLATFORM
|
||||
enabled: true
|
||||
max-rows: 200000
|
||||
max-attempts: 3
|
||||
batch-size: 500
|
||||
baiyue.clients.finance.url: ${FINANCE_SERVICE_URL:}
|
||||
baiyue.clients.integration.url: ${INTEGRATION_SERVICE_URL:}
|
||||
@@ -1,9 +0,0 @@
|
||||
spring:
|
||||
datasource:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: ${FINANCE_DB_URL:jdbc:mysql://127.0.0.1:3306/baiyue_finance?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true}
|
||||
username: ${FINANCE_DB_USERNAME:root}
|
||||
password: ${FINANCE_DB_PASSWORD:123456}
|
||||
baiyue.clients.warehouse.url: ${WAREHOUSE_SERVICE_URL:}
|
||||
baiyue.finance.recharge.qr-code-url: ${FINANCE_RECHARGE_QR_CODE_URL:/customer-recharge-qr.svg}
|
||||
baiyue.finance.wallet.default-credit-limit: ${FINANCE_WALLET_DEFAULT_CREDIT_LIMIT:0.00}
|
||||
@@ -1,69 +0,0 @@
|
||||
spring.datasource:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: ${FIRSTLEG_DB_URL:jdbc:mysql://127.0.0.1:3306/baiyue_firstleg?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true}
|
||||
username: ${FIRSTLEG_DB_USERNAME:root}
|
||||
password: ${FIRSTLEG_DB_PASSWORD:123456}
|
||||
spring.servlet.multipart.max-file-size: ${FIRSTLEG_MULTIPART_MAX_FILE_SIZE:50MB}
|
||||
spring.servlet.multipart.max-request-size: ${FIRSTLEG_MULTIPART_MAX_REQUEST_SIZE:52MB}
|
||||
baiyue.clients.warehouse.url: ${WAREHOUSE_SERVICE_URL:}
|
||||
baiyue.clients.order.url: ${ORDER_SERVICE_URL:}
|
||||
baiyue.clients.file.url: ${FILE_SERVICE_URL:}
|
||||
baiyue.carrier-schedule.providers.matson-automated: ${MATSON_TRACKING_ENABLED:false}
|
||||
baiyue.carrier-schedule.providers.sml-automated: ${SML_TRACKING_ENABLED:false}
|
||||
baiyue.carrier-schedule.providers.zim-official-api-enabled: ${ZIM_TRACKING_ENABLED:false}
|
||||
baiyue.carrier-schedule.providers.cosco-official-api-enabled: ${COSCO_OPEN_API_ENABLED:false}
|
||||
baiyue.carrier-schedule.providers.emc-automated: ${EMC_TRACKING_ENABLED:false}
|
||||
baiyue.carrier-schedule.providers.hede-automated: ${HEDE_TRACKING_ENABLED:false}
|
||||
baiyue.carrier-schedule.scheduler.zone: ${CARRIER_SCHEDULE_ZONE:Asia/Shanghai}
|
||||
baiyue.carrier-schedule.scheduler.enabled: ${CARRIER_SCHEDULE_SCHEDULER_ENABLED:false}
|
||||
baiyue.carrier-schedule.scheduler.scan-fixed-delay: ${CARRIER_SCHEDULE_SCAN_FIXED_DELAY:PT1M}
|
||||
baiyue.carrier-schedule.scheduler.scan-initial-delay: ${CARRIER_SCHEDULE_SCAN_INITIAL_DELAY:PT10S}
|
||||
baiyue.carrier-schedule.scheduler.batch-size: ${CARRIER_SCHEDULE_BATCH_SIZE:20}
|
||||
baiyue.carrier-schedule.scheduler.max-tasks-per-trigger: ${CARRIER_SCHEDULE_MAX_TASKS_PER_TRIGGER:2000}
|
||||
baiyue.carrier-schedule.scheduler.lease-duration: ${CARRIER_SCHEDULE_LEASE_DURATION:PT5M}
|
||||
firstleg:
|
||||
lingxing:
|
||||
auto-sync-enabled: ${LINGXING_AUTO_SYNC_ENABLED:false}
|
||||
base-url: ${LINGXING_DIRECT_BASE_URL:https://wms.xlwms.com}
|
||||
login-origin: ${LINGXING_LOGIN_ORIGIN:https://wms.xlwms.com}
|
||||
provider-key: ${LINGXING_PROVIDER_KEY:LINGXING_01}
|
||||
# Firstleg and the isolated Lingxing browser run on the same Docker network.
|
||||
# Keep the environment override for deployments that use another endpoint.
|
||||
browser-cdp-endpoint: ${LINGXING_BROWSER_CDP_ENDPOINT:http://lingxing-browser:9222}
|
||||
username: ${LINGXING_USERNAME:}
|
||||
password: ${LINGXING_PASSWORD:}
|
||||
browser-session-required: ${LINGXING_BROWSER_SESSION_REQUIRED:true}
|
||||
token-ttl-seconds: ${LINGXING_TOKEN_TTL_SECONDS:172800}
|
||||
token-expiry-safety-seconds: ${LINGXING_TOKEN_EXPIRY_SAFETY_SECONDS:300}
|
||||
track-key-v2-secret-base64: ${LINGXING_TRACK_KEY_V2_SECRET_BASE64:}
|
||||
request-timeout: ${LINGXING_REQUEST_TIMEOUT:30s}
|
||||
warehouses: [US01, US02]
|
||||
inbound:
|
||||
allow-rejected-measurement: false
|
||||
default-pallet-capacity-cbm: ${DEFAULT_PALLET_CAPACITY_CBM:1.200000}
|
||||
reservation-ttl: ${PALLET_RESERVATION_TTL:30m}
|
||||
warehouse-resource-tenant-id: 0
|
||||
measurement-openapi:
|
||||
enabled: ${MEASUREMENT_OPENAPI_ENABLED:false}
|
||||
# 墨家首轮联调暂不验 HMAC;通讯确认后将环境变量改为 true 即可恢复。
|
||||
signature-required: ${MEASUREMENT_OPENAPI_SIGNATURE_REQUIRED:false}
|
||||
max-clock-skew: ${MEASUREMENT_OPENAPI_MAX_CLOCK_SKEW:5m}
|
||||
nonce-ttl: ${MEASUREMENT_OPENAPI_NONCE_TTL:10m}
|
||||
apps:
|
||||
# 墨家使用平台级 AppKey;tenant-id 固定为 0,按全局箱码解析真实客户。
|
||||
# warehouse-bindings 的键必须与设备上传的 machineNo 完全一致。
|
||||
mojia:
|
||||
enabled: ${MOJIA_MEASUREMENT_ENABLED:false}
|
||||
secret: ${MOJIA_MEASUREMENT_SECRET:}
|
||||
tenant-id: ${MOJIA_MEASUREMENT_TENANT_ID:0}
|
||||
subject-id: ${MOJIA_MEASUREMENT_SUBJECT_ID:0}
|
||||
warehouse-bindings:
|
||||
mojia-yiwu-01: ${MOJIA_MEASUREMENT_WAREHOUSE_ID:0}
|
||||
# 历史通用应用配置,保留兼容;新接入请使用 mojia。
|
||||
device-provider:
|
||||
enabled: ${MEASUREMENT_DEVICE_PROVIDER_ENABLED:false}
|
||||
secret: ${MEASUREMENT_DEVICE_PROVIDER_SECRET:}
|
||||
tenant-id: ${MEASUREMENT_DEVICE_PROVIDER_TENANT_ID:0}
|
||||
subject-id: ${MEASUREMENT_DEVICE_PROVIDER_SUBJECT_ID:0}
|
||||
warehouse-bindings:
|
||||
CN-YW-01: ${MEASUREMENT_DEVICE_PROVIDER_WAREHOUSE_ID:0}
|
||||
@@ -1,16 +0,0 @@
|
||||
springdoc:
|
||||
api-docs.enabled: ${SWAGGER_ENABLED:true}
|
||||
swagger-ui.enabled: ${SWAGGER_ENABLED:true}
|
||||
baiyue:
|
||||
security:
|
||||
issuer: ${JWT_ISSUER:auth-service}
|
||||
audience: ${JWT_AUDIENCE:lastleg-api}
|
||||
jwk-set-uri: ${JWT_JWK_SET_URI:http://127.0.0.1:9100/api/auth/.well-known/jwks.json}
|
||||
pda-session-validation:
|
||||
auth-url: ${AUTH_SESSION_VALIDATION_URL:http://127.0.0.1:9100}
|
||||
internal-service-token: ${INTERNAL_SERVICE_TOKEN:phase1-local-internal-token-at-least-32-bytes}
|
||||
timeout: ${PDA_SESSION_VALIDATION_TIMEOUT:2s}
|
||||
overseas-projection:
|
||||
service-url: ${LASTLEG_SECURITY_SERVICE_URL:http://127.0.0.1:9303}
|
||||
internal-service-token: ${INTERNAL_SERVICE_TOKEN:phase1-local-internal-token-at-least-32-bytes}
|
||||
timeout: ${LASTLEG_SECURITY_VALIDATION_TIMEOUT:2s}
|
||||
@@ -1,11 +0,0 @@
|
||||
springdoc:
|
||||
api-docs.enabled: ${SWAGGER_ENABLED:true}
|
||||
swagger-ui.enabled: ${SWAGGER_ENABLED:true}
|
||||
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: ${CORS_ALLOWED_METHODS:GET,POST,PUT,PATCH,DELETE,OPTIONS}
|
||||
allowed-headers: ${CORS_ALLOWED_HEADERS:*}
|
||||
exposed-headers: ${CORS_EXPOSED_HEADERS:X-Request-Id,X-Trace-Id}
|
||||
allow-credentials: ${CORS_ALLOW_CREDENTIALS:true}
|
||||
max-age: ${CORS_MAX_AGE:3600}
|
||||
@@ -1,16 +0,0 @@
|
||||
spring.datasource:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: ${IAM_DB_URL:jdbc:mysql://127.0.0.1:3306/baiyue_iam?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true}
|
||||
username: ${IAM_DB_USERNAME:root}
|
||||
password: ${IAM_DB_PASSWORD:123456}
|
||||
baiyue:
|
||||
security-event:
|
||||
# 本机只运行一个 Event Bridge;部署环境通过 SECURITY_EVENT_BRIDGE_URL 指向海外实例。
|
||||
event-bridge-url: ${SECURITY_EVENT_BRIDGE_URL:http://127.0.0.1:9312}
|
||||
customer-dimension-initialization:
|
||||
fixed-delay-ms: ${CUSTOMER_DIMENSION_INITIALIZATION_FIXED_DELAY_MS:5000}
|
||||
max-attempts: ${CUSTOMER_DIMENSION_INITIALIZATION_MAX_ATTEMPTS:12}
|
||||
notification:
|
||||
scheduler-enabled: ${NOTIFICATION_SCHEDULER_ENABLED:false}
|
||||
dispatch-timeout-seconds: ${NOTIFICATION_DISPATCH_TIMEOUT_SECONDS:300}
|
||||
mq-consumer-enabled: ${NOTIFICATION_MQ_CONSUMER_ENABLED:false}
|
||||
@@ -1,53 +0,0 @@
|
||||
spring:
|
||||
servlet:
|
||||
multipart:
|
||||
max-file-size: 5MB
|
||||
max-request-size: 6MB
|
||||
|
||||
baiyue:
|
||||
integration:
|
||||
baidu-ocr:
|
||||
enabled: ${BAIDU_OCR_ENABLED:false}
|
||||
input-root: ${WEIGHT_OCR_INPUT_ROOT:${java.io.tmpdir}/baiyue-weight-ocr/input}
|
||||
output-root: ${WEIGHT_OCR_OUTPUT_ROOT:${java.io.tmpdir}/baiyue-weight-ocr/output}
|
||||
max-image-size: ${WEIGHT_OCR_MAX_IMAGE_SIZE:5MB}
|
||||
max-image-pixels: ${WEIGHT_OCR_MAX_IMAGE_PIXELS:40000000}
|
||||
max-batch-size: ${WEIGHT_OCR_MAX_BATCH_SIZE:50}
|
||||
amazon-sp-api:
|
||||
enabled: ${AMAZON_SP_API_ENABLED:false}
|
||||
carrier-schedule:
|
||||
matson:
|
||||
enabled: ${MATSON_TRACKING_ENABLED:false}
|
||||
page-url: ${MATSON_TRACKING_PAGE_URL:https://www.matson.com/shipment-tracking.html}
|
||||
query-url: ${MATSON_TRACKING_QUERY_URL:https://www.matson.com/wp-content/plugins/matson-plugin/Api_calls/tracking_booking_proxy.php}
|
||||
connect-timeout: ${MATSON_TRACKING_CONNECT_TIMEOUT:10s}
|
||||
request-timeout: ${MATSON_TRACKING_REQUEST_TIMEOUT:30s}
|
||||
min-request-interval: ${MATSON_TRACKING_MIN_REQUEST_INTERVAL:5s}
|
||||
hede:
|
||||
enabled: ${HEDE_TRACKING_ENABLED:false}
|
||||
query-url: ${HEDE_TRACKING_QUERY_URL:http://elines.hedehk.com/getVBilldynamic}
|
||||
connect-timeout: ${HEDE_TRACKING_CONNECT_TIMEOUT:10s}
|
||||
request-timeout: ${HEDE_TRACKING_REQUEST_TIMEOUT:30s}
|
||||
min-request-interval: ${HEDE_TRACKING_MIN_REQUEST_INTERVAL:5s}
|
||||
sml:
|
||||
enabled: ${SML_TRACKING_ENABLED:false}
|
||||
query-url: ${SML_TRACKING_QUERY_URL:https://esvc.smlines.com/smline/CUP_HOM_3301GS.do}
|
||||
connect-timeout: ${SML_TRACKING_CONNECT_TIMEOUT:10s}
|
||||
request-timeout: ${SML_TRACKING_REQUEST_TIMEOUT:30s}
|
||||
min-request-interval: ${SML_TRACKING_MIN_REQUEST_INTERVAL:5s}
|
||||
zim:
|
||||
enabled: ${ZIM_TRACKING_ENABLED:false}
|
||||
authorization-url: ${ZIM_AUTHORIZATION_URL:https://apigw.zim.com/authorize/v1}
|
||||
tracing-base-url: ${ZIM_TRACING_BASE_URL:https://apigw.zim.com/tracing/v2}
|
||||
client-id: ${ZIM_CLIENT_ID:}
|
||||
client-secret: ${ZIM_CLIENT_SECRET:}
|
||||
subscription-key: ${ZIM_TRACKING_SUBSCRIPTION_KEY:}
|
||||
connect-timeout: ${ZIM_TRACKING_CONNECT_TIMEOUT:10s}
|
||||
request-timeout: ${ZIM_TRACKING_REQUEST_TIMEOUT:30s}
|
||||
max-concurrency: ${ZIM_TRACKING_MAX_CONCURRENCY:10}
|
||||
evergreen:
|
||||
enabled: ${EMC_TRACKING_ENABLED:false}
|
||||
query-url: ${EMC_TRACKING_QUERY_URL:https://www.evergreen-shipping.cn/servlet/TDB1_CargoTracking.do}
|
||||
connect-timeout: ${EMC_TRACKING_CONNECT_TIMEOUT:10s}
|
||||
request-timeout: ${EMC_TRACKING_REQUEST_TIMEOUT:30s}
|
||||
min-request-interval: ${EMC_TRACKING_MIN_REQUEST_INTERVAL:5s}
|
||||
@@ -1,29 +0,0 @@
|
||||
spring:
|
||||
datasource:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: ${LASTLEG_DB_URL:jdbc:mysql://127.0.0.1:3306/baiyue_lastleg?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true}
|
||||
username: ${LASTLEG_DB_USERNAME:root}
|
||||
password: ${LASTLEG_DB_PASSWORD:123456}
|
||||
lastleg:
|
||||
dispatch-query-api.enabled: ${LASTLEG_DISPATCH_QUERY_API_ENABLED:true}
|
||||
smart-dispatch-api.enabled: ${LASTLEG_SMART_DISPATCH_API_ENABLED:true}
|
||||
baiyue:
|
||||
clients:
|
||||
domestic-warehouse:
|
||||
url: ${DOMESTIC_WAREHOUSE_URL:http://127.0.0.1:9205}
|
||||
cache-ttl: ${DOMESTIC_WAREHOUSE_CACHE_TTL:30m}
|
||||
file:
|
||||
url: ${FILE_SERVICE_URL:http://127.0.0.1:9206}
|
||||
event-bridge:
|
||||
url: ${CN_EVENT_BRIDGE_URL:${FIRSTLEG_EVENT_BRIDGE_URL:http://127.0.0.1:9312}}
|
||||
warehouse:
|
||||
base-url: ${WAREHOUSE_OVERSEAS_SERVICE_URL:http://127.0.0.1:9305}
|
||||
firstleg:
|
||||
event-bridge-url: ${CN_EVENT_BRIDGE_URL:${FIRSTLEG_EVENT_BRIDGE_URL:http://127.0.0.1:9312}}
|
||||
security:
|
||||
internal-service-token: ${INTERNAL_SERVICE_TOKEN:phase1-local-internal-token-at-least-32-bytes}
|
||||
jwt-mode: jwks
|
||||
session-mode: redis
|
||||
issuer: ${JWT_ISSUER:auth-service}
|
||||
audience: ${JWT_AUDIENCE:lastleg-api}
|
||||
jwk-set-uri: ${JWT_JWKS_URI:http://auth-service:9100/api/auth/.well-known/jwks.json}
|
||||
@@ -1,11 +0,0 @@
|
||||
spring.datasource:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: ${ORDER_DB_URL:jdbc:mysql://127.0.0.1:3306/baiyue_order?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true}
|
||||
username: ${ORDER_DB_USERNAME:root}
|
||||
password: ${ORDER_DB_PASSWORD:123456}
|
||||
baiyue.clients:
|
||||
warehouse.url: ${WAREHOUSE_SERVICE_URL:}
|
||||
|
||||
baiyue.order:
|
||||
# 默认由新系统自动生成;仅在两套系统并跑期间显式改为 LEGACY_MANUAL。
|
||||
inbound-code-mode: ${ORDER_INBOUND_CODE_MODE:AUTO}
|
||||
@@ -1,11 +0,0 @@
|
||||
print:
|
||||
pdf:
|
||||
max-pages: ${PRINT_PDF_MAX_PAGES:2000}
|
||||
max-request-bytes: ${PRINT_PDF_MAX_REQUEST_BYTES:2097152}
|
||||
max-output-bytes: ${PRINT_PDF_MAX_OUTPUT_BYTES:33554432}
|
||||
max-concurrent-generations: ${PRINT_PDF_MAX_CONCURRENT_GENERATIONS:4}
|
||||
acquire-timeout: ${PRINT_PDF_ACQUIRE_TIMEOUT:1s}
|
||||
template-code: INBOUND_MARK_V1
|
||||
supported-width-mm: 100
|
||||
supported-height-mm: 100
|
||||
font-resource: fonts/NotoSansSC-Bold.ttf
|
||||
@@ -1,19 +0,0 @@
|
||||
spring:
|
||||
datasource:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: ${WAREHOUSE_DB_URL:jdbc:mysql://127.0.0.1:3306/baiyue_lastlag_warehouse?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true}
|
||||
username: ${WAREHOUSE_DB_USERNAME:root}
|
||||
password: ${WAREHOUSE_DB_PASSWORD:123456}
|
||||
baiyue:
|
||||
clients:
|
||||
domestic-warehouse:
|
||||
url: ${DOMESTIC_WAREHOUSE_URL:http://127.0.0.1:9205}
|
||||
cache-ttl: ${DOMESTIC_WAREHOUSE_CACHE_TTL:30m}
|
||||
internal-service:
|
||||
token: ${INTERNAL_SERVICE_TOKEN:phase1-local-internal-token-at-least-32-bytes}
|
||||
security:
|
||||
jwt-mode: jwks
|
||||
session-mode: redis
|
||||
issuer: ${JWT_ISSUER:auth-service}
|
||||
audience: ${JWT_AUDIENCE:lastleg-api}
|
||||
jwk-set-uri: ${JWT_JWKS_URI:http://auth-service:9100/api/auth/.well-known/jwks.json}
|
||||
@@ -1,5 +0,0 @@
|
||||
spring.datasource:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: ${WAREHOUSE_DB_URL:jdbc:mysql://127.0.0.1:3306/baiyue_warehouse?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true}
|
||||
username: ${WAREHOUSE_DB_USERNAME:root}
|
||||
password: ${WAREHOUSE_DB_PASSWORD:123456}
|
||||
@@ -1,19 +0,0 @@
|
||||
# 海外 Nacos 配置
|
||||
|
||||
本目录是海外远程部署模板,由 dev/development、test 和 production 共用。配置只引用环境变量,不保存密码或访问密钥;三个环境必须发布到各自独立的 Nacos namespace,Gateway 必须同时启用 `overseas` Profile。
|
||||
|
||||
海外入口与仓储 Data ID 分别为 `gateway-overseas.yml`、`warehouse-overseas-service.yml`。`print-service.yml` 对应头程仓库保留的共用打印服务,不包含尾程旧 Print 模块。
|
||||
|
||||
发布示例:
|
||||
|
||||
```powershell
|
||||
# 开发环境
|
||||
powershell -ExecutionPolicy Bypass -File D:\baiyue-firstleg\scripts\publish-nacos-config.ps1 `
|
||||
-Environment development -Region overseas -ServerAddr <dev-nacos> -Namespace <dev-overseas-namespace>
|
||||
|
||||
# 测试环境
|
||||
powershell -ExecutionPolicy Bypass -File D:\baiyue-firstleg\scripts\publish-nacos-config.ps1 `
|
||||
-Environment test -Region overseas -ServerAddr <test-nacos> -Namespace <test-overseas-namespace>
|
||||
```
|
||||
|
||||
远程环境禁止使用 `public` namespace。数据库、Redis、JWKS、内部服务令牌和跨区服务地址继续由对应 Jenkins Secret file 提供;不要把真实值写入本目录。
|
||||
@@ -1,6 +0,0 @@
|
||||
spring:
|
||||
datasource:
|
||||
url: ${AUDIT_DB_URL}
|
||||
username: ${AUDIT_DB_USERNAME}
|
||||
password: ${AUDIT_DB_PASSWORD}
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
@@ -1,67 +0,0 @@
|
||||
baiyue:
|
||||
deployment:
|
||||
region-code: ${REGION_CODE:OVERSEAS}
|
||||
cell: ${DEPLOYMENT_CELL:prod-overseas}
|
||||
data-residency: ${DATA_RESIDENCY:OVERSEAS}
|
||||
security:
|
||||
issuer: ${JWT_ISSUER:auth-service}
|
||||
audience: ${JWT_AUDIENCE:lastleg-api}
|
||||
jwk-set-uri: ${JWT_JWK_SET_URI:http://127.0.0.1:9100/api/auth/.well-known/jwks.json}
|
||||
internal-service-token: ${INTERNAL_SERVICE_TOKEN}
|
||||
pda-session-validation:
|
||||
auth-url: ${AUTH_SESSION_VALIDATION_URL}
|
||||
internal-service-token: ${INTERNAL_SERVICE_TOKEN}
|
||||
timeout: ${PDA_SESSION_VALIDATION_TIMEOUT:2s}
|
||||
permission-snapshot-key-prefix: ${PERMISSION_SNAPSHOT_KEY_PREFIX:baiyue:permission-snapshot}
|
||||
openapi.enabled: ${SWAGGER_ENABLED:false}
|
||||
audit.enabled: true
|
||||
spring:
|
||||
jackson:
|
||||
default-property-inclusion: non_null
|
||||
deserialization:
|
||||
fail-on-unknown-properties: false
|
||||
serialization:
|
||||
write-dates-as-timestamps: false
|
||||
data:
|
||||
redis:
|
||||
host: ${REDIS_HOST:redis-overseas.internal}
|
||||
port: ${REDIS_PORT:6379}
|
||||
password: ${REDIS_PASSWORD:}
|
||||
database: ${REDIS_DATABASE:0}
|
||||
timeout: ${REDIS_TIMEOUT:3s}
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
group: ${NACOS_GROUP:BAIYUE}
|
||||
namespace: ${NACOS_NAMESPACE:prod-overseas}
|
||||
openfeign:
|
||||
circuitbreaker.enabled: true
|
||||
client.config.default:
|
||||
connect-timeout: 3000
|
||||
read-timeout: 5000
|
||||
server:
|
||||
max-http-request-header-size: ${SERVER_MAX_HTTP_REQUEST_HEADER_SIZE:32KB}
|
||||
shutdown: graceful
|
||||
management:
|
||||
endpoints:
|
||||
web:
|
||||
exposure:
|
||||
include: health,info,prometheus
|
||||
endpoint:
|
||||
health:
|
||||
probes.enabled: true
|
||||
show-details: never
|
||||
mybatis-plus:
|
||||
configuration:
|
||||
map-underscore-to-camel-case: true
|
||||
call-setters-on-nulls: true
|
||||
global-config:
|
||||
banner: false
|
||||
db-config:
|
||||
id-type: assign_id
|
||||
logic-delete-field: deleted
|
||||
logic-delete-value: 1
|
||||
logic-not-delete-value: 0
|
||||
springdoc:
|
||||
api-docs.enabled: ${SWAGGER_ENABLED:false}
|
||||
swagger-ui.enabled: ${SWAGGER_ENABLED:false}
|
||||
@@ -1,21 +0,0 @@
|
||||
spring:
|
||||
datasource:
|
||||
url: ${EVENT_BRIDGE_DB_URL}
|
||||
username: ${EVENT_BRIDGE_DB_USERNAME}
|
||||
password: ${EVENT_BRIDGE_DB_PASSWORD}
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
baiyue:
|
||||
region: ${REGION_CODE:OVERSEAS}
|
||||
deployment-cell: ${DEPLOYMENT_CELL:prod-overseas}
|
||||
data-residency: ${DATA_RESIDENCY:OVERSEAS}
|
||||
event-dispatcher:
|
||||
consumer-url: ${EVENT_CONSUMER_URL:http://lastleg-service:9303/internal/lastleg/events}
|
||||
security-consumer-url: ${LASTLEG_SECURITY_EVENT_CONSUMER_URL:http://lastleg-service:9303/internal/lastleg/security/v1/events}
|
||||
fixed-delay: ${EVENT_DISPATCH_FIXED_DELAY:3000}
|
||||
batch-size: ${EVENT_DISPATCH_BATCH_SIZE:50}
|
||||
max-attempts: ${EVENT_DISPATCH_MAX_ATTEMPTS:10}
|
||||
lease-duration: ${EVENT_DISPATCH_LEASE_DURATION:30s}
|
||||
initial-backoff: ${EVENT_DISPATCH_INITIAL_BACKOFF:5s}
|
||||
max-backoff: ${EVENT_DISPATCH_MAX_BACKOFF:15m}
|
||||
connect-timeout: ${EVENT_DISPATCH_CONNECT_TIMEOUT:3s}
|
||||
request-timeout: ${EVENT_DISPATCH_REQUEST_TIMEOUT:10s}
|
||||
@@ -1,13 +0,0 @@
|
||||
spring:
|
||||
datasource:
|
||||
url: ${FILE_DB_URL}
|
||||
username: ${FILE_DB_USERNAME}
|
||||
password: ${FILE_DB_PASSWORD}
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
file:
|
||||
storage:
|
||||
provider: ${FILE_STORAGE_PROVIDER:s3}
|
||||
endpoint: ${FILE_STORAGE_ENDPOINT:}
|
||||
bucket: ${FILE_STORAGE_BUCKET:}
|
||||
access-key: ${FILE_STORAGE_ACCESS_KEY:}
|
||||
secret-key: ${FILE_STORAGE_SECRET_KEY:}
|
||||
@@ -1,9 +0,0 @@
|
||||
springdoc:
|
||||
api-docs.enabled: ${SWAGGER_ENABLED:false}
|
||||
swagger-ui.enabled: ${SWAGGER_ENABLED:false}
|
||||
baiyue:
|
||||
security:
|
||||
overseas-projection:
|
||||
service-url: ${LASTLEG_SECURITY_SERVICE_URL:http://lastleg-service:9303}
|
||||
internal-service-token: ${INTERNAL_SERVICE_TOKEN}
|
||||
timeout: ${LASTLEG_SECURITY_VALIDATION_TIMEOUT:2s}
|
||||
@@ -1,12 +0,0 @@
|
||||
baiyue:
|
||||
integration:
|
||||
baidu-ocr:
|
||||
enabled: ${BAIDU_OCR_ENABLED:false}
|
||||
amazon-sp-api:
|
||||
enabled: ${AMAZON_SP_API_ENABLED:true}
|
||||
client-id: ${AMAZON_SP_API_CLIENT_ID:}
|
||||
client-secret: ${AMAZON_SP_API_CLIENT_SECRET:}
|
||||
refresh-token: ${AMAZON_SP_API_REFRESH_TOKEN:}
|
||||
aws-access-key: ${AMAZON_SP_API_AWS_ACCESS_KEY:}
|
||||
aws-secret-key: ${AMAZON_SP_API_AWS_SECRET_KEY:}
|
||||
region: ${AMAZON_SP_API_REGION:}
|
||||
@@ -1,6 +0,0 @@
|
||||
spring:
|
||||
datasource:
|
||||
url: ${PRINT_DB_URL}
|
||||
username: ${PRINT_DB_USERNAME}
|
||||
password: ${PRINT_DB_PASSWORD}
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
@@ -0,0 +1,9 @@
|
||||
# TEST 单机配置
|
||||
|
||||
唯一导入目录为本目录的 14 个 YAML:`baiyue-common.yml` 加 13 个服务 Data ID。Group 默认 `BAIYUE`,所有配置和发现共用实际 `NACOS_NAMESPACE` ID;不能填写命名空间显示名。先导入公共配置再导入服务配置。应用不再使用 optional import,缺失配置应阻断启动。
|
||||
|
||||
变量在服务进程内解析,导入文件不得替换成真实密钥。无密钥模板见 `../../../deploy/env/.env.test.example`。私钥仅传入 Auth;运维令牌仅传入 Firstleg、Finance、Lastleg。各业务数据库 Schema 独立。
|
||||
|
||||
离线预检:`./scripts/publish-nacos-config.ps1 -ServerAddr '<explicit-address>' -Namespace '<actual-id>' -DryRun`(从后端根运行,不联网、不登录)。正式发布去掉 DryRun,会修改指定 Nacos,需授权;认证从进程环境 NACOS_USERNAME/NACOS_PASSWORD 取得。失败立即停止,已发布项不自动撤销,保存本轮配置版本并在停写窗口重新发布完整匹配集合。
|
||||
|
||||
切换顺序、发布与恢复约束见 `../../../deploy/TEST单机部署执行清单.md`;文件存在不代表环境已发布。
|
||||
@@ -0,0 +1,12 @@
|
||||
spring:
|
||||
datasource:
|
||||
url: ${AUTH_DB_URL}
|
||||
username: ${AUTH_DB_USERNAME}
|
||||
password: ${AUTH_DB_PASSWORD}
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
baiyue:
|
||||
security:
|
||||
access-token-ttl: ${ACCESS_TOKEN_TTL:24m}
|
||||
refresh-token-ttl: ${REFRESH_TOKEN_TTL:7d}
|
||||
baiyue.security.jwt.rsa-jwk-set: ${JWT_RSA_JWK_SET}
|
||||
baiyue.security.jwt.current-kid: ${JWT_CURRENT_KID}
|
||||
@@ -1,10 +1,9 @@
|
||||
baiyue:
|
||||
deployment:
|
||||
region-code: ${REGION_CODE:CN}
|
||||
cell: ${DEPLOYMENT_CELL:prod-cn}
|
||||
data-residency: ${DATA_RESIDENCY:CN}
|
||||
security:
|
||||
jwt-secret: ${JWT_SECRET}
|
||||
jwt-mode: jwks
|
||||
session-mode: redis
|
||||
audience: ${JWT_AUDIENCE:lastleg-api}
|
||||
jwk-set-uri: ${JWT_JWKS_URI:http://auth:9100/api/auth/.well-known/jwks.json}
|
||||
issuer: ${JWT_ISSUER:auth-service}
|
||||
internal-service-token: ${INTERNAL_SERVICE_TOKEN}
|
||||
token-key-prefix: ${REDIS_TOKEN_KEY_PREFIX:baiyue:auth}
|
||||
@@ -24,7 +23,7 @@ baiyue:
|
||||
compensation-delay-minutes: ${AUDIT_OUTBOX_COMPENSATION_DELAY_MINUTES:30}
|
||||
retention-days: ${AUDIT_OUTBOX_RETENTION_DAYS:30}
|
||||
rocketmq:
|
||||
topic: ${MQ_TOPIC_PREFIX:}baiyue-audit-event-v1
|
||||
topic: ${MQ_TOPIC_PREFIX:test-}baiyue-audit-event-v1
|
||||
send-timeout-ms: ${AUDIT_MQ_SEND_TIMEOUT_MS:3000}
|
||||
spring:
|
||||
jackson:
|
||||
@@ -35,7 +34,8 @@ spring:
|
||||
write-dates-as-timestamps: false
|
||||
data:
|
||||
redis:
|
||||
host: ${REDIS_HOST:redis-cn.internal}
|
||||
username: ${REDIS_USERNAME:default}
|
||||
host: ${REDIS_HOST}
|
||||
port: ${REDIS_PORT:6379}
|
||||
password: ${REDIS_PASSWORD:}
|
||||
database: ${REDIS_DATABASE:0}
|
||||
@@ -44,7 +44,7 @@ spring:
|
||||
nacos:
|
||||
discovery:
|
||||
group: ${NACOS_GROUP:BAIYUE}
|
||||
namespace: ${NACOS_NAMESPACE:prod-cn}
|
||||
namespace: ${NACOS_NAMESPACE}
|
||||
openfeign:
|
||||
circuitbreaker.enabled: true
|
||||
client.config.default:
|
||||
@@ -76,3 +76,5 @@ mybatis-plus:
|
||||
springdoc:
|
||||
api-docs.enabled: ${SWAGGER_ENABLED:false}
|
||||
swagger-ui.enabled: ${SWAGGER_ENABLED:false}
|
||||
|
||||
baiyue.security.session-validation-uri: ${AUTH_SESSION_VALIDATION_URL:http://auth:9100/internal/auth/accounts/sessions/validate}
|
||||
@@ -0,0 +1,18 @@
|
||||
spring:
|
||||
datasource:
|
||||
url: ${FINANCE_DB_URL}
|
||||
username: ${FINANCE_DB_USERNAME}
|
||||
password: ${FINANCE_DB_PASSWORD}
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
baiyue.clients.warehouse.url: ${WAREHOUSE_SERVICE_URL:}
|
||||
baiyue.finance.recharge.qr-code-url: ${FINANCE_RECHARGE_QR_CODE_URL:}
|
||||
baiyue.finance.wallet.default-credit-limit: ${FINANCE_WALLET_DEFAULT_CREDIT_LIMIT:0.00}
|
||||
baiyue.event-delivery.observation-enabled: true
|
||||
baiyue.event-delivery.operations-token: ${EVENT_OPERATIONS_TOKEN:}
|
||||
baiyue.event-delivery.connect-timeout-ms: ${EVENT_CONNECT_TIMEOUT_MS:3000}
|
||||
baiyue.event-delivery.read-timeout-ms: ${EVENT_READ_TIMEOUT_MS:15000}
|
||||
baiyue.event-delivery.lease-seconds: ${EVENT_LEASE_SECONDS:60}
|
||||
baiyue.event-delivery.max-attempts: ${EVENT_MAX_ATTEMPTS:12}
|
||||
baiyue.event-delivery.base-delay-seconds: ${EVENT_BASE_DELAY_SECONDS:5}
|
||||
baiyue.event-delivery.max-delay-seconds: ${EVENT_MAX_DELAY_SECONDS:1800}
|
||||
baiyue.event-delivery.jitter: ${EVENT_JITTER:0.1}
|
||||
@@ -29,11 +29,8 @@ baiyue:
|
||||
max-tasks-per-trigger: ${CARRIER_SCHEDULE_MAX_TASKS_PER_TRIGGER:2000}
|
||||
lease-duration: ${CARRIER_SCHEDULE_LEASE_DURATION:PT5M}
|
||||
lastleg:
|
||||
event-bridge-url: ${LASTLEG_EVENT_BRIDGE_URL}
|
||||
outbox-relay:
|
||||
fixed-delay-ms: ${LASTLEG_OUTBOX_RELAY_FIXED_DELAY_MS:5000}
|
||||
lease-seconds: ${LASTLEG_OUTBOX_RELAY_LEASE_SECONDS:60}
|
||||
retry-seconds: ${LASTLEG_OUTBOX_RELAY_RETRY_SECONDS:30}
|
||||
firstleg:
|
||||
lingxing:
|
||||
# 安全默认关闭;开启后自动任务才允许调用领星新品维护接口。
|
||||
@@ -81,3 +78,12 @@ firstleg:
|
||||
subject-id: ${MEASUREMENT_DEVICE_PROVIDER_SUBJECT_ID:0}
|
||||
warehouse-bindings:
|
||||
CN-YW-01: ${MEASUREMENT_DEVICE_PROVIDER_WAREHOUSE_ID:0}
|
||||
baiyue.event-delivery.observation-enabled: true
|
||||
baiyue.event-delivery.operations-token: ${EVENT_OPERATIONS_TOKEN:}
|
||||
baiyue.event-delivery.connect-timeout-ms: ${EVENT_CONNECT_TIMEOUT_MS:3000}
|
||||
baiyue.event-delivery.read-timeout-ms: ${EVENT_READ_TIMEOUT_MS:15000}
|
||||
baiyue.event-delivery.lease-seconds: ${EVENT_LEASE_SECONDS:60}
|
||||
baiyue.event-delivery.max-attempts: ${EVENT_MAX_ATTEMPTS:12}
|
||||
baiyue.event-delivery.base-delay-seconds: ${EVENT_BASE_DELAY_SECONDS:5}
|
||||
baiyue.event-delivery.max-delay-seconds: ${EVENT_MAX_DELAY_SECONDS:1800}
|
||||
baiyue.event-delivery.jitter: ${EVENT_JITTER:0.1}
|
||||
@@ -5,8 +5,6 @@ spring:
|
||||
password: ${IAM_DB_PASSWORD}
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
baiyue:
|
||||
security-event:
|
||||
event-bridge-url: ${SECURITY_EVENT_BRIDGE_URL:http://event-bridge-overseas:9312}
|
||||
customer-dimension-initialization:
|
||||
fixed-delay-ms: ${CUSTOMER_DIMENSION_INITIALIZATION_FIXED_DELAY_MS:5000}
|
||||
max-attempts: ${CUSTOMER_DIMENSION_INITIALIZATION_MAX_ATTEMPTS:12}
|
||||
@@ -45,13 +45,17 @@ baiyue:
|
||||
url: ${FILE_SERVICE_URL}
|
||||
domestic-file:
|
||||
url: ${FILE_SERVICE_URL}
|
||||
event-bridge:
|
||||
url: ${CN_EVENT_BRIDGE_URL:${FIRSTLEG_EVENT_BRIDGE_URL}}
|
||||
warehouse:
|
||||
base-url: ${WAREHOUSE_OVERSEAS_SERVICE_URL:http://warehouse-overseas-service:9305}
|
||||
firstleg:
|
||||
event-bridge-url: ${CN_EVENT_BRIDGE_URL:${FIRSTLEG_EVENT_BRIDGE_URL}}
|
||||
outbox-relay:
|
||||
fixed-delay-ms: ${FIRSTLEG_OUTBOX_RELAY_FIXED_DELAY_MS:5000}
|
||||
lease-seconds: ${FIRSTLEG_OUTBOX_RELAY_LEASE_SECONDS:60}
|
||||
retry-seconds: ${FIRSTLEG_OUTBOX_RELAY_RETRY_SECONDS:30}
|
||||
baiyue.event-delivery.observation-enabled: true
|
||||
baiyue.event-delivery.operations-token: ${EVENT_OPERATIONS_TOKEN:}
|
||||
baiyue.event-delivery.connect-timeout-ms: ${EVENT_CONNECT_TIMEOUT_MS:3000}
|
||||
baiyue.event-delivery.read-timeout-ms: ${EVENT_READ_TIMEOUT_MS:15000}
|
||||
baiyue.event-delivery.lease-seconds: ${EVENT_LEASE_SECONDS:60}
|
||||
baiyue.event-delivery.max-attempts: ${EVENT_MAX_ATTEMPTS:12}
|
||||
baiyue.event-delivery.base-delay-seconds: ${EVENT_BASE_DELAY_SECONDS:5}
|
||||
baiyue.event-delivery.max-delay-seconds: ${EVENT_MAX_DELAY_SECONDS:1800}
|
||||
baiyue.event-delivery.jitter: ${EVENT_JITTER:0.1}
|
||||
Reference in New Issue
Block a user