Summary of all aspects of getting started with SpringCloud Alibaba components (Part 1): registration center-nacos, load balancing-ribbon, remote calling-feign

Article directory Nacos Ribbon Feign FeignExpansion Nacos Concept: Nacos is a new open source project launched by Alibaba. It is a dynamic service discovery, configuration management and service management platform that makes it easier to build cloud native applications. Nacos is committed to helping users discover, configure and manage microservices. It provides a simple and […]

SpringBoot integrates Dubbo and Nacos

1. Overview Dubbo is a high-performance, lightweight open source distributed service framework, which was early open sourced by Alibaba. It provides distributed service management functions such as service registration, discovery, invocation and load balancing, which provides great convenience for distributed development. The core concepts of dubbo include: Provider (consumer provider), Consumer (service consumer), Registry (registration […]

Docker installation of mysql, redis, rabbitmq, es, nacos under Liunx

1. Environment preparation Note: Ignore if related tools have already been installed. 1Install JAVA operating environment Step 1: Upload or download the installation package cd /usr/local jdk-8u152-linux-x64.tar.gz Step 2: Unzip the installation package tar -zxvf jdk-8u152-linux-x64.tar.gz Step 3: Establish a soft connection ln -s /usr/local/jdk1.8.0_152/ /usr/local/jdk Step 4: Modify environment variables vim /etc/profile export JAVA_HOME=/usr/local/jdk […]

“Understand in one article” Nacos service registration implementation principle

Contents of this chapter Service Registry The main function of the service registry is to store service registration information. Service registry structure, as shown in the figure: Service registry: // com.alibaba.nacos.naming.core.ServiceManager#serviceMap Map<String, Map<String, Service>> serviceMap = new ConcurrentHashMap<>(); in: Outer map: key: namespace (namespace), mainly used for environment isolation, such as: public, production environment, test […]

nacos does service configuration and server discovery

1. Create a project 1. Create a spring-boot project 2. Create three modules: file, system, and gateway modules 3. file and system configure startup information respectively, and create a simple controller server.port=9000 spring.application.name=file server.servlet.context-path=/file 4. Introduce dependencies in the root directory <properties> <java.version>1.8</java.version> <spring-cloud.version>2021.0.8</spring-cloud.version> </properties> … <dependencyManagement> <dependencies> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-dependencies</artifactId> <version>${spring-cloud.version}</version> <type>pom</type> <scope>import</scope> </dependency> […]

final finally finalize difference stream stream Stream method mvc aop ioc understanding the difference between Collection and Collections Nacos AP, CP

Method to create thread 1. The class inherits Thread and overrides the run() method 2. The class implements the Runnable interface and overrides the run() method (no return value, no exception will be thrown) 3. Implement the Callable interface and implement the call() method (with a return value and an exception will be thrown) To […]

nacos configuration center docker deployment, configuration and goLang integration use

Why a configuration center is needed Usually when we write a demo, or a single application, there will be a configuration file, whether it is a json file or a yaml file, which contains redis, mysql, es and other information. If we modify the configuration file, we often A restart is required. In order to […]

The underlying implementation principle of Nacos & the two calling methods of the registration center

Table of Contents 1. The underlying implementation principle of Nacos 1.1 Implementation principle of automatic refresh of configuration center 1.2 The underlying implementation principle of the registration center 2. Two ways to call the Nacos registration center 2.1 How to call RestTemplate + Spring Cloud LoadBalancer 2.2 Using OpenFeign + Spring Cloud LoadBalancer 1. The […]

SpringCloudAlibaba 2021.0.1 – Complete project construction (Nacos + OpenFeign + Getway + Sentinel)

Table of Contents 1. Complete construction of SpringCloudAlibaba project 1.1. Initialization project 1.1.1. Create project 1.1.2. Configure the pom.xml of the parent project 1.1.3. Create submodules 1.2. user microservice 1.2.1. Configuration pom.xml 1.2.2. Create application.yml configuration file 1.2.3. Create startup class 1.2.4. Testing 1.3. product microservice 1.3.1. Configuration pom.xml 1.3.2. Create application.yml configuration file 1.3.3. […]