Registration and Discovery Service registry for Spring cloud-Services (Eureka Server)

Source: Internet
Author: User

What does Spring cloud produce?

According to this introduction of the official website, we can know that Spring cloud is a tool for developers, and the use of this tool is to help developers quickly develop a more general distributed system .

(while tools include: Configuration management, service discovery, circuit breakers, routing, Micro Proxies, control bus, one-time tokens, global locks, leading elections, distributed sessions, cluster status)

What is Spring boot based on?

This shows thatSpring Cloud was developed based on spring boot .

Today we are mainly looking at the configuration and use of the service registry.

There may be a point to be mentioned here, that is, the previous service registration and discovery code does not support Spring Boot 2.0. More than 0 of the version, but now it is supported, the main explanation here today is based on the 2.0.1

We say Spring cloud is a big tool, and every small module inside it is a gadget, and the service finds that it uses Netflix Eureka

How to get started?

First we go to the official website to download the spring Cloud's basic code package

Because we see that we are setting up Eureka Server, the annotations we need to use are @enableeurekaserver

But this is not so smooth, because the build.gradle of the official website does not introduce the server dependence

And where we're going to introduce it, where do we find it? Take a look at the following pictures

In this, we can copy this sentence from the dependencies,

Compile ' org.springframework.cloud:spring-cloud-starter-eureka-server'

And then rebuild the project, and that's when idea doesn't report red.

After that, we also need to configure the following information in our Yml file

Note: Both Registerwitheureka and Fetchregistry must be configured to be false

This time we enter your configured IP in the Address bar: port to access, you will see the following page

To this Eureka server has been configured successfully

Registration and Discovery Service registry for Spring cloud-Services (Eureka Server)

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.