Search code examples
javaspring-mvcnetflix-eurekaspring-4

Spring 4 application register as client to Eureka


I have a Spring 4 application (not Spring Boot) and I want it to register to Eureka service discovery.

Is there any way to do it? because all tutorials are tightly connected to Spring Boot.


Solution

  • What I have done:

    In the "webapp" module, I have created a class which implements InitalizingBean, and override the methods. In post construct method, I have just send POST request to Eureka, and register my application as a service.

    My application is now registered as microservice in Eureka