diff --git a/fizz-bootstrap/pom.xml b/fizz-bootstrap/pom.xml index cdf0738..801d1d9 100644 --- a/fizz-bootstrap/pom.xml +++ b/fizz-bootstrap/pom.xml @@ -12,7 +12,7 @@ com.fizzgate fizz-bootstrap - 2.6.2 + 2.6.3 1.8 diff --git a/fizz-common/pom.xml b/fizz-common/pom.xml index dabbe42..91ad0e9 100644 --- a/fizz-common/pom.xml +++ b/fizz-common/pom.xml @@ -5,7 +5,7 @@ fizz-gateway-community com.fizzgate - 2.6.2 + 2.6.3 ../pom.xml 4.0.0 diff --git a/fizz-core/pom.xml b/fizz-core/pom.xml index 7bf45a8..796448f 100644 --- a/fizz-core/pom.xml +++ b/fizz-core/pom.xml @@ -5,7 +5,7 @@ fizz-gateway-community com.fizzgate - 2.6.2 + 2.6.3 ../pom.xml 4.0.0 diff --git a/fizz-core/src/main/java/we/service_registry/FizzServiceRegistration.java b/fizz-core/src/main/java/we/service_registry/FizzServiceRegistration.java index 0eef5ce..df74ac9 100644 --- a/fizz-core/src/main/java/we/service_registry/FizzServiceRegistration.java +++ b/fizz-core/src/main/java/we/service_registry/FizzServiceRegistration.java @@ -50,7 +50,7 @@ public abstract class FizzServiceRegistration { UP, DOWN, STARTING, OUT_OF_SERVICE, UNKNOWN; } - private String id; + protected String id; private Type type; @@ -91,12 +91,22 @@ public abstract class FizzServiceRegistration { public void register() { serviceRegistry.register(registration); + LOGGER.info("register to {} {}", type, id); } public void deregister() { serviceRegistry.deregister(registration); + LOGGER.info("deregister to {} {}", type, id); } + public void close() { + serviceRegistry.close(); + shutdownClient(); + LOGGER.info("close {} {}", type, id); + } + + protected abstract void shutdownClient(); + public abstract ServerStatus getServerStatus(); public abstract List getServices(); diff --git a/fizz-core/src/main/java/we/service_registry/RegistryCenterService.java b/fizz-core/src/main/java/we/service_registry/RegistryCenterService.java index 2d82f22..bceff00 100644 --- a/fizz-core/src/main/java/we/service_registry/RegistryCenterService.java +++ b/fizz-core/src/main/java/we/service_registry/RegistryCenterService.java @@ -32,7 +32,6 @@ import we.util.JacksonUtils; import we.util.Result; import we.util.ThreadContext; -import javax.annotation.PostConstruct; import javax.annotation.Resource; import java.util.Collections; import java.util.HashMap; @@ -45,7 +44,7 @@ import java.util.Map; @Service public class RegistryCenterService implements ApplicationListener { - private static final Logger log = LoggerFactory.getLogger(RegistryCenterService.class); + private static final Logger LOGGER = LoggerFactory.getLogger(RegistryCenterService.class); private Map registryCenterMap = new HashMap<>(); @@ -81,7 +80,7 @@ public class RegistryCenterService implements ApplicationListener { - log.info("success to lsn on {}", channel); + LOGGER.info("success to lsn on {}", channel); } ) .doOnNext( @@ -134,19 +133,23 @@ public class RegistryCenterService implements ApplicationListener fizz-gateway-community com.fizzgate - 2.6.2 + 2.6.3 ../pom.xml 4.0.0 diff --git a/fizz-spring-boot-starter/pom.xml b/fizz-spring-boot-starter/pom.xml index e3f5a22..fe5a637 100644 --- a/fizz-spring-boot-starter/pom.xml +++ b/fizz-spring-boot-starter/pom.xml @@ -5,7 +5,7 @@ fizz-gateway-community com.fizzgate - 2.6.2 + 2.6.3 ../pom.xml 4.0.0 diff --git a/pom.xml b/pom.xml index f9177a0..f06b3af 100644 --- a/pom.xml +++ b/pom.xml @@ -37,7 +37,7 @@ fizz-gateway-community ${project.artifactId} fizz gateway community - 2.6.2 + 2.6.3 pom fizz-common