The most easiest SpringCloud tutorial ever | Chapter 1: Service registration and discovery Eureka (Finchley version)
- Introduction to spring cloud
Spring Cloud provides developers with tools to quickly build distributed systems, including configuration management, service discovery, circuit breakers, routing, micro-agents, event buses, global locks, decision campaigns, distributed sessions, and more. It runs in a simple environment and can run on the developer’s computer. In addition, spring cloud is based on springboot, so you need to have a certain understanding of spring boot in development.
2. Create a service registry
Here, I use Eureka as the component for service registration and discovery.
2.1 First create a maven main project.
First create a main Maven project and introduce dependencies in its pom file. The spring Boot version is 2.0.3.RELEASE, and the Spring Cloud version is Finchley.RELEASE. This pom file acts as a parent pom file and plays a role in dependent version control, and other module projects inherit the pom.
This series of articles all adopt this mode, and the pom of other articles is the same as this pom. To explain again, it will not be introduced again in the future. code show as below: