diff --git a/deploy/docker-compose.overseas.yml b/deploy/docker-compose.overseas.yml index 12d49a4a2..33709eb4a 100644 --- a/deploy/docker-compose.overseas.yml +++ b/deploy/docker-compose.overseas.yml @@ -65,6 +65,8 @@ services: FIRSTLEG_EVENT_BRIDGE_URL: ${CN_EVENT_BRIDGE_TARGET_URL:-http://event-bridge-cn:9312} DOMESTIC_WAREHOUSE_URL: ${DOMESTIC_WAREHOUSE_URL} FILE_SERVICE_URL: ${FILE_SERVICE_URL} + # Print 注册在国内 Nacos namespace;海外服务通过共享 infra-network 的 Docker DNS 直连。 + PRINT_SERVICE_URL: ${PRINT_SERVICE_URL:-http://print:9207} WAREHOUSE_OVERSEAS_SERVICE_URL: ${WAREHOUSE_OVERSEAS_SERVICE_URL:-http://warehouse-overseas-service:9305} warehouse-overseas-service: diff --git a/lastleg-service/src/test/java/com/baiyue/lastleg/controller/Phase4BrowserApiBoundaryTest.java b/lastleg-service/src/test/java/com/baiyue/lastleg/controller/Phase4BrowserApiBoundaryTest.java index bd545b2de..890f61a38 100644 --- a/lastleg-service/src/test/java/com/baiyue/lastleg/controller/Phase4BrowserApiBoundaryTest.java +++ b/lastleg-service/src/test/java/com/baiyue/lastleg/controller/Phase4BrowserApiBoundaryTest.java @@ -72,6 +72,14 @@ class Phase4BrowserApiBoundaryTest { assertTrue(yaml.contains("enabled: ${LASTLEG_SMART_DISPATCH_API_ENABLED:true}")); } + @Test + void overseasLastlegReachesDomesticPrintThroughSharedInfrastructureNetwork() throws Exception { + Path composePath = Path.of("deploy/docker-compose.overseas.yml"); + if (!Files.exists(composePath)) composePath = Path.of("..").resolve(composePath); + String compose = Files.readString(composePath); + assertTrue(compose.contains("PRINT_SERVICE_URL: ${PRINT_SERVICE_URL:-http://print:9207}")); + } + @Test void smartDispatchOnlyExposesCandidatePreArrangeAndDraftLifecycleEndpoints() { ConditionalOnProperty condition = SmartDispatchController.class.getAnnotation(ConditionalOnProperty.class);