Spring Cloud Eureka 3 (Eureka client registration service provider)

Source: Internet
Author: User

After completing the Service registration center, let's try to add an existing spring boot application to Eureka's service governance system

Create a new spring boot project to join Eureka client Dependency

The Eureka client dependency, not the server dependency, is added here

View under dependent packages

Adding @enablediscoveryclient annotations to the main class

Add the following configuration information to the Application.properties

# Service Name, registration center to mark the service
Spring.application.name=hello-service
# Specify the registration center
Eureka.client.serviceurl.defaultzone=http://localhost:1111/eureka
Start the project
View the service registry at the same time

At this point a normal spring boot project is registered with our Service registration center.


Spring Cloud Eureka 3 (Eureka client registration service provider)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.