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/