SpringCloud使用声明式调用客户端
背景
客户端client 调用 服务端 provider。
客户端 和 服务端共同引入公共包。
使用公共模块供client 和 provider继承可以较少代码量的同时可以防止填写的url出错。
公共包有接口如:
@Service
@RequestMapping("/refactor")
public interface HelloService{
@RequestMapping(value = "/hello4",method = RequestMethod.GET)
原创
2020-12-04 00:26:20 ·
111 阅读 ·
0 评论