Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to install and use Nacos

Shulou Source: shulou.com Published: 2022-05-31 13:06:17 09月21日 Update

This article mainly explains "how to install and use Nacos". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to install and use Nacos.

Nacos service registers and discovers SpringCloud Alibaba

Spring Cloud Alibaba is committed to providing one-stop solutions for microservice development. This project contains the necessary components for the development of distributed application micro-services, making it easy for developers to use these components to develop distributed application services through the Spring Cloud programming model.

Relying on Spring Cloud Alibaba, you only need to add some annotations and a small amount of configuration to connect the Spring Cloud application to the Ali micro service solution, and quickly build the distributed application system through Ali middleware.

Basic introduction and installation of Nacos

A dynamic service discovery, configuration management and service management platform that is easier to build cloud native applications. Nacos= Registry + configuration Center

Official document: https://nacos.io/zh-cn/docs/quick-start-spring-cloud.html

Installation

Decompression

Start by command

The password to access the http://localhost:8848/nacos/#/login account is: nacos

Basic use

Order service is transformed into Nacos client

Import dependency

Com.alibaba.cloud spring-cloud-starter-alibaba-nacos-discovery

Configuration

Server.port=8803spring.application.name=nacos-order# registry address spring.cloud.nacos.discovery.server-addr=localhost:8848

Note @ EnableDiscoveryClient on the startup class

Starting the project can be seen in the registry

At this point, I believe you have a deeper understanding of "how to install and use Nacos". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Tags: Services applications development configuration distributed content solutions annotations components solutions projects Ali learning management practical deeper middleware interests dynamics commands Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi Huawei Linux Shulou Tech Info Redmi