icordoba
icordoba

Reputation: 1899

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)

Upvotes: 2

Views: 1953

Answers (3)

Souf KMD
Souf KMD

Reputation: 199

You can do it by using Eureka REST operations. Here is the link of the official documentation:

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

Upvotes: 0

icordoba
icordoba

Reputation: 1899

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

Upvotes: 0

Related Questions