SC Alibaba20211102 Nacos 微服务框架结构 SerivceImplOrder <OpenFeign> SerivceImplMember 群
1、命名规则
2、群
3、实例 群
i)、SerivceImplMember群 2019、20019
@RestController
public class MemberServiceImpl implements MemberService {
@Value("${server.port}")
private String serverPort;
@Override
public String getUser(@RequestParam("useId") Integer useId) {
return "端口【"+serverPort+"】 我是会员服务 userId:"+useId;
}
}
ii)、SerivceImplOrder <OpenFeign> SerivceImplMember 群
@RestController
public class OrderService {
@Autowired
private MemberServiceFeign memberServiceFeign;
@RequestMapping("/orderFeignToMember")
public String orderFeignToMember(){
String result=memberServiceFeign.getUser(1);
return "【ServiceImplOrder 2020】我是订单服务调用会员服务【ServiceImplMember 2019\20019】的接口"+result;
}
}
iii)、