GuLi Mall-SpringCloud Alibaba-Nacos Registration Center

Introduction:

Nacos (Dynamic Naming and Configuration Service) is a modern application architecture centered on "services" (such as

Such as microservice paradigm, cloud native paradigm) service infrastructure. dedicated to service discovery, configuration and management, and provides a set of simple

Easy-to-use feature set. Make it easier to discover, manage, share, and combine microservices.

Original link: https://blog.csdn.net/weixin_53358125/article/details/127522810


Nacos is a dynamic service discovery, configuration management and service management platform that is open sourced by Alibaba and is easier to build cloud-native applications.

tower. He is written in java. Need to rely on the java environment.

Nacos documentation:

Nacos Quick Start

Nacos2.0 documentation:

Nacos Quick Start

Documentation on GitHub:

spring-cloud-alibaba/README-zh.md at 2022.x · alibaba/spring-cloud-alibaba · GitHub

Detailed configuration instructions:

spring-cloud-alibaba/readme-zh.md at 2022.x · alibaba/spring-cloud-alibaba · GitHub


The last version of Nacos1 is 1.4.4, but the minor version does not affect, I download 1.4.3

How to install and start, refer to:

https://blog.csdn.net/ZHOU_VIP/article/details/126495459

http://localhost:8848/nacos/#/login

account password is

nacos


Register microservices in nacos

1. First, modify the pom.xml file and import Nacos Discovery Starter.

2. Configure the Nacos Server address in the /src/main/resources/application.properties configuration file of the application 

3. Use the @EnableDiscoveryClient annotation to enable service registration and discovery 

http://localhost:8848/nacos/#/login

Also give each service a name and tell the registration center

application:
  name: gulimall-coupon

Start the virtual machine and mysql, but the startup still reports an error. It is suspected to be a nacos version problem, but the result is not

reason:

Result registration is successful:


Similarly, member services are also registered to the registration center

Guess you like

Origin blog.csdn.net/ZHOU_VIP/article/details/128961594