2 years ago

#48973

test-img

gstbia

API working EUREKA - Error when using @Component

Guys

I have a microservice that works using the eureka architecture (discovery, gateway) and the database connection is in another service. When I start the application I want it to call a method for that I use @Component in the class and @Bean in the method. However, when called, it still hasn't completed the registrations in Eureka and when I get to the @Component lifecycle, I still don't have the connection to the database.

I need something that waits for the application to upload everything before calling this service.

Java11

spring-boot

java-11

netflix-eureka

0 Answers

Your Answer

Accepted video resources