From 77e0db05be57ecb139952ca01aeb7daa250327dc Mon Sep 17 00:00:00 2001 From: tanghc Date: Mon, 30 Dec 2019 17:04:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=BC=E5=AE=B9=E6=B3=A8=E5=86=8C=E4=B8=AD?= =?UTF-8?q?=E5=BF=83=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/docs/files/90100_常见问题.md | 2 +- .../sop/adminserver/service/impl/RegistryServiceNacosImpl.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/docs/files/90100_常见问题.md b/doc/docs/files/90100_常见问题.md index 81c9d7b9..9399505a 100644 --- a/doc/docs/files/90100_常见问题.md +++ b/doc/docs/files/90100_常见问题.md @@ -103,7 +103,7 @@ yml添加: ribbon.ReadTimeout: 60000 ``` -## 指定了context-path +## 指定了context-path(拉取路由404) 微服务项目定义了`server.servlet.context-path=/story-service`,同时必须指定: diff --git a/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/service/impl/RegistryServiceNacosImpl.java b/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/service/impl/RegistryServiceNacosImpl.java index a7bfced5..94c181fb 100644 --- a/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/service/impl/RegistryServiceNacosImpl.java +++ b/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/service/impl/RegistryServiceNacosImpl.java @@ -33,7 +33,7 @@ public class RegistryServiceNacosImpl implements RegistryService { private static HttpTool httpTool = new HttpTool(); - @Value("${nacos.discovery.server-addr:${registry.nacos-server-addr:}}") + @Value("${nacos.discovery.server-addr:${spring.cloud.nacos.discovery.server-addr:}}") private String nacosAddr; private NamingService namingService;