In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly introduces "how to configure Nacos service registration and discovery". In daily operation, I believe many people have doubts about how to configure Nacos service registration and discovery. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts of "how to configure Nacos service registration and discovery"! Next, please follow the editor to study!
1 server 1.1 download nacos-server
Https://download.csdn.net/download/qq_28336351/14936184
1.2 start the service
Take Mac as an example to demonstrate.
Go to the nacos/bin directory.
Start the command:
Sh startup.sh-m standalone1.3 management platform
Address: http://localhost:8848/nacos
Default account: nacos
Default password: nacos
1.4 stop the service
Take Mac as an example to demonstrate.
Go to the nacos/bin directory.
Start the command:
Screenshot of sh shutdown.sh1.5 interface
Client 2.1 relies on com.alibaba.cloud spring-cloud-starter-alibaba-nacos-discovery2.2 automatic configuration / * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "ASIS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * / package com.fengwenyi.demouserservicecore.config;import org.springframework.cloud.client.discovery.EnableDiscoveryClient;import org.springframework.context.annotation.Configuration;/** * @ author theonefx * / @ EnableDiscoveryClient@Configurationpublic class NacosDiscoveryConfiguration {} 2.3 configuration spring.cloud.nacos.discovery.server-addr=127.0.0.1:8848spring.cloud.nacos.discovery.group=springcloud-alibaba-demo2.4 interface screenshot
At this point, the study on "how to configure Nacos service registration and discovery" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.