Search code examples
spring-bootspring-cloudnetflix-zuulnetflix-eurekaspring-cloud-netflix

How to register non Spring Boot MicroService in Eureka discovery server


I have recently installed a micro service infrastraucture based on Spring Boot + Spring Cloud. My Spring Boot microservices register in my Eureka server and Zuul automaticaly redirects requests to them.

I have a Drupal content manager that exposes content through REST interface and I'd like it to take part in the discovery rave party. How can I have my drupal register it self in the Eureka server so Zuul redirects the corresponding calls to it?

As an ugly workaround I wonder if I can have automatic discovery and routing running in Zuul while manually configuring some REST paths to be redirected to the drupal server? (Using zuul.routes... property files)


Solution

  • I found that I can add manual zuul routes in bootstrap.yaml I have tried adding it in the application yaml property files in configuration server but for some reason they are ignored when the Eureka discovery server is working. Anyway, bootstrap.yaml works. Example:

    zuul:
      routes:
        mta_api:
          path: /mta_api/**
          url: http://my-non-springboot-rest-service.com/
          stripPrefix: false