E
E
Egor Lepikhin2020-01-29 11:30:50
Java
Egor Lepikhin, 2020-01-29 11:30:50

What is the right way to access a microservice?

I'm building a web application based on microservices. I need to address from one microservice to the second.
And the real question is, what is the best way to do this? Somewhere I saw libraries that allow you to send requests, but maybe there are solutions built into spring mvc?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir Korotenko, 2020-01-29
@firedragon

Look here, sensibly painted
https://www.baeldung.com/spring-webclient-resttemplate

N
Narryel, 2020-01-30
@narryel

Depends on the specific implementation of the microservice architecture, but most often the call occurs via REST Api
In spring, this can be done using restTemplate

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question