Introduction and use of Eureka

catalogue Introduction to Eureka Spring Cloud introduces Eureka 1. Create cloud Eureka server7001 subproject Dependency needs to be introduced (indicates eureka server): Write yml: For main startup, add the annotation @EnableEurekaServer 2.The cloud-consumer-order80 of Eureka client will register into Eureka server and become a consume ...

Posted by stig1 on Sat, 13 Aug 2022 21:17:34 +0300

The service Gateway of Spring Cloud integrates Swagger components

Spring Cloud's service gateway gateway (II) integrates Swagger components summary Swagger is a visual API testing tool, which can effectively build powerful Restful API documents and save interface document management If the code is modified, the API document will be updated in real time And it can partially replace Postman to debug the inte ...

Posted by Gomesh on Tue, 17 May 2022 11:37:00 +0300

Database and SpringBoot foundation 02

Example 1: realize the function of registration and login Home page: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <body> <h1>Project Homepage</h1> <a href="/reg.html">register</a> <a href="/login.html">Sign in&l ...

Posted by rsasalm on Fri, 13 May 2022 22:48:22 +0300

Eureka registration center stand-alone function implementation of SpringCloud microservice

Eureka overview service registration Microservices are different services distributed on different hosts, and there may be a calling relationship between services. We may call other services by hard-coding the service address, so that there are many inconveniences for the later addition of services and the redeployment of services, so the re ...

Posted by njm on Fri, 06 May 2022 02:54:52 +0300

Eureka - Client service start

We can see from the following figure that as a client, it has the following functions: Register: register your own information with Eureka Server, such as IP address, port, etc. Renew: after the service is started, a heartbeat will be sent to Eureka Server every 30 seconds to renew the service. Get (service discovery): get the list of services ...

Posted by zerogreen on Sun, 01 May 2022 03:48:08 +0300

EurekaServer source code analysis

Eureka Server features Accept service registration Service heartbeat Service rejection Service offline Cluster synchronization Get the service instance information in the registry It should be noted that Eureka Server is also an Eureka Client. When the client behavior of Eureka Server is not prohibited, it will pull the registry, service regi ...

Posted by michaelh613 on Mon, 11 Apr 2022 05:28:20 +0300

Several methods of remote invocation between microservices (RestTemplate, Eureka, Nacos, feign)

1.RestTemplate call First declare a bean in the caller's startup class: public class OrderApplication {    public static void main(String[] args) {        SpringApplication.run(OrderApplication.class, args);   }    //Implement remote call    @Bean    public RestTemplate restTemplate() {        return new RestTemplate();   } } Then ...

Posted by cparekh on Thu, 31 Mar 2022 10:21:54 +0300