前言
本文介绍如何通过Nacos作为配置中心,实现Dubbo服务的注册与消费
以HelloService服务为例
public interface HelloService {
String sayHello(String name);
}
服务提供方和消费方都引入以下jar
<dependencys>
<!-- Spring Boot dependencies -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-spring-boot-starter</artifactId>
</dependency>