在Springcloud的openfeign,调用服务出错
这里是项目productProductService.javapublic class ServiceController { //test @GetMapping("/msg") public String getMsg() { return "这是product里面得接口"; }}-----------------------------------------------这里是项目feignProductClient.java(interface)@FeignClient(name = "product")public interface ProductClient { @Bean @GetMapping("/msg") public String getMsg();}------------------------ClientController.java@RestControllerpublic class ClientController { @Autowired private ProductClient productClient; @GetMapping("/getMessage") public String getMag() { return productClient.getMsg(); }}
|
免责声明:本内容仅代表回答会员见解不代表天盟观点,请谨慎对待。
版权声明:作者保留权利,不代表天盟立场。
|
|
|
|