public class EurekaBootStrap
extends java.lang.Object
implements javax.servlet.ServletContextListener
The eureka server is configured by using the configuration
EurekaServerConfig specified by eureka.server.props in the
classpath. The eureka client component is also initialized by using the
configuration EurekaInstanceConfig specified by
eureka.client.props. If the server runs in the AWS cloud, the eureka
server binds it to the elastic ip as specified.
| Constructor and Description |
|---|
EurekaBootStrap() |
| Modifier and Type | Method and Description |
|---|---|
void |
contextDestroyed(javax.servlet.ServletContextEvent event)
Handles Eureka cleanup, including shutting down all monitors and yielding all EIPs.
|
void |
contextInitialized(javax.servlet.ServletContextEvent event)
Initializes Eureka, including syncing up with other Eureka peers and publishing the registry.
|
protected void |
destroyEurekaEnvironment()
Users can override to clean up the environment themselves.
|
protected void |
initEurekaEnvironment()
Users can override to initialize the environment themselves.
|
public void contextInitialized(javax.servlet.ServletContextEvent event)
contextInitialized in interface javax.servlet.ServletContextListenerServletContextListener.contextInitialized(javax.servlet.ServletContextEvent)protected void initEurekaEnvironment()
public void contextDestroyed(javax.servlet.ServletContextEvent event)
contextDestroyed in interface javax.servlet.ServletContextListenerServletContextListener.contextDestroyed(javax.servlet.ServletContextEvent)protected void destroyEurekaEnvironment()