4

I have a eureka server and some services(spring-boot apps), they register to the eureka and use the Feign to communicate with each other. I also have a big old app using spring. it is packed into war and deployed into a jetty server. I can't rewrite it using spring-boot, but the app has to communicate with other services through the Feign and Eureka. Also i can use spring-cloud into the app if it helps.

How could i use eureka+feign without spring-boot? Please help me.

slippery
  • 355
  • 2
  • 6
  • 13
  • I'm looking at doing the same thing. Have you had any luck creating a Ribbon client without spring boot? – Pytry Jan 04 '17 at 17:56
  • Refer https://stackoverflow.com/questions/35409492/eureka-service-discovery-without-spring-boot/46011852#46011852 – lives Sep 02 '17 at 08:44

2 Answers2

0

The spring-boot is intended to add extra jars on the classpath of your application and nothing else, with this idea in mind, I think so, you could use eureka and Feign with no problems, you should only check which jars are being wrapped inside spring-boot applications, and add them to your existing spring app, in order to get eureka and feign up and running

Rene Enriquez
  • 1,418
  • 1
  • 13
  • 33
-1

Scenario 1: Spring boot application as API consumer.

In this scenario, the most simple way is just add some configuration like this:

say-hello:
  ribbon:
   eureka:
    enabled: false
  listOfServers: localhost:8090,localhost:9092,localhost:9999
  ServerListRefreshInterval: 15000

after this you can use FeignClient communicate with the old app.

more details please see: https://spring.io/guides/gs/client-side-load-balancing/

Scenario 2: The old application as API consumer

Please ref: https://github.com/Netflix/eureka/wiki/Eureka-REST-operations

Eureka already provide rest operations, that you can query service instances info.

Yunlong
  • 224
  • 2
  • 7