public void onApplicationEvent(ContextClosedEvent event) {
		if (event.getApplicationContext() == context) {
			stop();
		}
	}
Provides an implementation of {@link AutoServiceRegistration} for registering service
instances in Eureka.

@author Dave Syer
@author Spencer Gibb
@author Jon Schneider
@author Jakub Narloch
@author Raiyan Raiyan
@author Olga Maciaszek-Sharma
spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/serviceregistry/EurekaAutoServiceRegistration.java