Contains a simple project for many uses. Eureka Discovery Channel -> Spring boot gateway -> Spring microservice -> mysqldb
Spring Boot Project by https://start.spring.io/ application.properties: We must define the server.port, spring.application.name, eureka.client.service-url.defaultZone and do not registerWithEureka. Main class: Must add the anotation @SpringBootApplication to make this a pring boot application. Dependencies: org.springframework.cloud spring-cloud-starter-netflix-eureka-server Optional: Create a controller with @RestController anotation and the @RequestMapping route. Create a method with @GetMapping to check the status of the microservice.
application.properties: We must define the server.port, spring.application.name, eureka.client.serviceUrl.defaultZone and spring.cloud.gateway.discovery.locator.enabled to register the microservice with eureka discovery server Main class: Must add the anotation @SpringBootApplication to make this a pring boot application. Dependencies: org.springframework.cloud spring-cloud-starter-gateway org.springframework.cloud spring-cloud-starter-netflix-eureka-client Optional: Create a controller with @RestController anotation and the @RequestMapping route. Create a method with @GetMapping to check the status of the microservice.
This part will contain the definition of the other microservices.