First, create a service registration center
1. Create a Spring boot project
2, the introduction of Eureka-server dependency (can also be created in the project when the Eureka-server service, automatically generate dependencies) Note The version number, the version is not possible to start the error, this time using the DALSTON.SR1 version
3. Start the Service Registration center function in the startup class
4, under the default settings, the service registry will also try to register itself as a client, so we need to disable its client registration behavior, only need to application.properties
add the following configuration in the Q:
5. Browser access to localhost:1111 (no task service registration at this time)
Second, create the service provider
1. Create spring boot project as above
2. Add Eureka Dependency
3. Add annotations to the startup class to activate the Discoveryclient
4. Create controller to provide simple Add task
5. Modify the configuration file as follows
6. Start the service and visit localhost:1111 again.
Spring Cloud (Service registration center and service provider – beginner one)