From f1d8cc831882d5f430b2e732888de7704a10bf6a Mon Sep 17 00:00:00 2001 From: tanghc Date: Mon, 10 Aug 2020 11:12:02 +0800 Subject: [PATCH] 4.0.2 --- .../java/com/gitee/app/config/OpenServletContextListener.java | 2 +- .../sop-story/src/main/resources/application-dev.properties | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/sop-example/sop-springmvc/src/main/java/com/gitee/app/config/OpenServletContextListener.java b/sop-example/sop-springmvc/src/main/java/com/gitee/app/config/OpenServletContextListener.java index fc99a94f..8b65ed64 100644 --- a/sop-example/sop-springmvc/src/main/java/com/gitee/app/config/OpenServletContextListener.java +++ b/sop-example/sop-springmvc/src/main/java/com/gitee/app/config/OpenServletContextListener.java @@ -27,7 +27,7 @@ public class OpenServletContextListener implements ServletContextListener { NamingService namingService = webApplicationContext.getBean(NamingService.class); try { - namingService.deregisterInstance(serviceId, ip, Integer.valueOf(port)); + namingService.deregisterInstance(serviceId, ip, Integer.parseInt(port)); } catch (NacosException e) { log.error("注销nacos服务失败,serviceId:{}, ip:{}, port:{}", serviceId, ip, port); } diff --git a/sop-example/sop-story/src/main/resources/application-dev.properties b/sop-example/sop-story/src/main/resources/application-dev.properties index 435c9b99..ea5b6216 100644 --- a/sop-example/sop-story/src/main/resources/application-dev.properties +++ b/sop-example/sop-story/src/main/resources/application-dev.properties @@ -2,5 +2,4 @@ server.port=2222 spring.application.name=story-service # 注册中心 spring.cloud.nacos.discovery.server-addr=127.0.0.1:8848 -eureka.client.serviceUrl.defaultZone=http://localhost:1111/eureka/