pull/3/head
tanghc 4 years ago
parent 49cd8f7fda
commit f1d8cc8318
  1. 2
      sop-example/sop-springmvc/src/main/java/com/gitee/app/config/OpenServletContextListener.java
  2. 1
      sop-example/sop-story/src/main/resources/application-dev.properties

@ -27,7 +27,7 @@ public class OpenServletContextListener implements ServletContextListener {
NamingService namingService = webApplicationContext.getBean(NamingService.class); NamingService namingService = webApplicationContext.getBean(NamingService.class);
try { try {
namingService.deregisterInstance(serviceId, ip, Integer.valueOf(port)); namingService.deregisterInstance(serviceId, ip, Integer.parseInt(port));
} catch (NacosException e) { } catch (NacosException e) {
log.error("注销nacos服务失败,serviceId:{}, ip:{}, port:{}", serviceId, ip, port); log.error("注销nacos服务失败,serviceId:{}, ip:{}, port:{}", serviceId, ip, port);
} }

@ -2,5 +2,4 @@ server.port=2222
spring.application.name=story-service spring.application.name=story-service
# 注册中心 # 注册中心
spring.cloud.nacos.discovery.server-addr=127.0.0.1:8848 spring.cloud.nacos.discovery.server-addr=127.0.0.1:8848
eureka.client.serviceUrl.defaultZone=http://localhost:1111/eureka/

Loading…
Cancel
Save