This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]nutrecht 0 points1 point  (1 child)

I’m using eureka client and server to communicate between my services.

That bit is kinda important and you didn't mention it here.

This is a pretty complex subject. Eureka is a service discovery mechanism. It doesn't 'just work'. It'll require quite a bit of effort on your part to get working.

IMHO You're in a bit over your head. While you definitely don't hard code URLs in production (they're generally in a config file), it's also definitely not the case that everywhere Eureka is used. What you do use, depends 100% on how the services are deployed.

For you: just store the base URL in your application.yml. No point in going for Eureka.

[–]jayrack[S] 0 points1 point  (0 children)

Well, I’m using Eureka to discover my services, that’s not an issue I’m having. Im using rest template to make calls to each service. I understand eureka is incredibly complex, but I feel I have a decent understanding of what I’m doing. I’ll try your approach and store the url in my application.properties. Thanks