0

I'm using Spring-Eureka for microservice discovery. I just implemented this bit and I want to maintain other parts of the system before I fully switch to service discovery.

The services published their host address which was configured by JAVA_OPTS. Now I wanted to publish what the Eureka client publishes. It is publishing a resolved IP address and the port. How can I get the application info for self from Eureka client?

Amanuel Nega
  • 1,899
  • 1
  • 24
  • 42

1 Answers1

0

@Value("http://${spring.cloud.client.hostname}:${server.port}")

That works. Hostname resolved by spring cloud and the application port should be the same as what would Eureka publishes.

Amanuel Nega
  • 1,899
  • 1
  • 24
  • 42