Reputation: 329
I have java application (without Spring or Spring Boot) where server starts by invoking this method:
public void startServer() {
com.sun.net.httpserver.HttpServer server = JdkHttpServerFactory.createHttpServer(address, resourceConfig, false);
logger.info("HTTP: Start Http-Server. Adress: %s", address);
server.start();
}
I want this application to act as Eureka Server
.
Eureka Clients
will be Spring services so I can configure them.
I have seen many tutorials how to setup Eureka Server with Spring application but I don't know how to implement it with non Spring app?
Do I have to add manually below endpoints to the Eureka Server? https://github.com/Netflix/eureka/wiki/Eureka-REST-operations
Upvotes: 0
Views: 392
Reputation: 17846
The Eureka Server is implemented as Jersey REST endpoints in a web application. It can be deployed as a WAR on any servlet container: Tomcat, JBoss, Jetty, etc.
You can build the WAR from the code at https://github.com/Netflix/eureka/eureka-server.
But the Java HTTP Server you are using does not support the servlet API, so you can't just add the WAR to it.
Upvotes: 2