I have a multi connectors microservice with rest, soap, grpc, graphql and I want to…
- User
I have a multi connectors microservice with rest, soap, grpc, graphql and I want to register it in the eureka discover server to be accessed from the cloud gateway of course I already added the dependency Eureka client and I added also the config spring.cloud.discovery.enabled=true in application.propreties but it still has not appeared in the Eureka interface (http://localhost:8761/)
- Assistant
In order to register your multi connectors microservice to the Eureka server, you need to ensure that you have correctly configured your microservice.
Here's a checklist to help you troubleshoot the problem:
- Make sure you added the correct dependencies in the
pom.xmlorbuild.gradlefile:
- For Maven (
pom.xml):
<dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId> </dependency> - Make sure you added the correct dependencies in the
- User
it still not working this is my application.proprieties server.port=8081 spring.application.name=immatriculation-service spring.datasource.url=jdbc:h2:mem:immatriculation-db spring.cloud.discovery.enabled=true grpc.server.port=9090 grpc.server.address=* spring.graphql.graphiql.enabled=true
- Assistant
Based on your provided
application.properties, it seems you're missing the Eureka client configuration. Add the following lines to yourapplication.propertiesfile:eureka.client.service-url.defaultZone=http://localhost:8761/eureka/ eureka.instance.prefer-ip-address=trueYour updated
application.propertiesshould look like this:server.port=8081 spring.application.name=immatriculation-service spring.datasource.url=jdbc:h2:mem:immatriculation-db spring.cloud.discovery.enabled=true eureka.client.service-url.defaultZone=http://localhost:8761/eureka/ eureka.instance.prefer-ip-address=true grpc.server.port=9090 grpc.server.address=* spring.graphql.graphiql.enabled=trueNow restart your Eureka server and your microservice, and check the Eureka dashboard again at
http://localhost:8761/.If it still doesn't work, make sure to check the logs on both your Eureka server and microservice for any error messages or warnings. This can help you identify issues with the configuration or any networking problems.