服务提供者:
- 1,定义服务接口
- 接口HelloService
public interface HelloService {
public String sayHello(String name);
}
- 2.实现类HelloServiceImpl
public class HelloServiceImpl implements HelloService {
@Override
public String sayHello(String name) {
return name+"调用了MyRpc的服务";
}
}