兼容注册中心配置

2.x
tanghc 5 years ago
parent d505ad94ab
commit 77e0db05be
  1. 2
      doc/docs/files/90100_常见问题.md
  2. 2
      sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/service/impl/RegistryServiceNacosImpl.java

@ -103,7 +103,7 @@ yml添加:
ribbon.ReadTimeout: 60000 ribbon.ReadTimeout: 60000
``` ```
## 指定了context-path ## 指定了context-path(拉取路由404)
微服务项目定义了`server.servlet.context-path=/story-service`,同时必须指定: 微服务项目定义了`server.servlet.context-path=/story-service`,同时必须指定:

@ -33,7 +33,7 @@ public class RegistryServiceNacosImpl implements RegistryService {
private static HttpTool httpTool = new HttpTool(); 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 String nacosAddr;
private NamingService namingService; private NamingService namingService;

Loading…
Cancel
Save