<!--dubbo-->
<dependency>
<groupId>com.alibaba.spring.boot</groupId>
<artifactId>dubbo-spring-boot-starter</artifactId>
<version>2.0.0</version>
</dependency>
接口
public interface IUseService {
public String sayHello(String name);
}
实现类
@Component
@Service(interfaceClass = IUseService.class) //dubbo注解
public class UserServiceImpl implements IUseService {
@Override
public String sayHello(String name) {
return "hello:"+name;
}
}