在Springcloud的openfeign,调用服务出错

这里是项目product
ProductService.java
public class ServiceController {
    //test
    @GetMapping("/msg")
    public String getMsg() {
        return "这是product里面得接口";
    }
}
-----------------------------------------------
这里是项目feign
ProductClient.java(interface)
@FeignClient(name = "product")
public interface ProductClient {
    @Bean
    @GetMapping("/msg")
    public String getMsg();
}
------------------------
ClientController.java
@RestController
public class ClientController {

    @Autowired
    private ProductClient productClient;
    @GetMapping("/getMessage")
    public String getMag() {
        return productClient.getMsg();
    }
}

http://img2.mukewang.com/5e837d2c0001933b16980799.jpg

Rohero
浏览 1360回答 0
0回答

慕慕5436299

OLOSARUIVIMKMMJQKKXBVVYFBICMZQAURLLCCGGJAHBLKNANHEBYIWGXXXKWTPCBQUQQCGHRBGAXSQWJTVWTJNXOJPCMXAVSCPHBIZFKHNAORSMJPGTXQFQDQOYYVCMUAOKKHHQNXMWJJNNOLKHUKNRLVLFQCBYYLSMMQCZEHRVHOIPSPYVSDUDEEVFWTCMQDWJNXNMITCGGQXPRHRRDDXHLJDLFIVEIDRYVYZYWCSFPQXGHRUWJWDDNDQKEISZCZJZDNHBEBRUQBEOLSXHTZSGULDKUHBTAMJNXNUHVLGDZMAXDDRLTOVLSJOHYSFJAHGWZAJGXHXNUAHESIPCQDQHSSVGZHRXWZGMJNHQUMMJYPVVJDXDHLOTJFWJDIBPZGSFINICFVJUEOBEPPGQKUXOGXGNRVRJXREAWMTDGTWCWWEBUAUGMGGGDEAGUELBCFHNVIBEVIEZBVPFVKRRHOYVPPEBHIMIIMEOIGDFVCGPGQKNZMDUUXTUBVISJPZTAGQGMZTZUBFCIZCQGWWFCZJAHXKAEXQXXLWQRLHDGSIXXHQXUDYRKJWMMMPTZXNKNAXHXXUAYIUKHZMPPMNTMMSLSCMFPYEWLVLFLSIBHCLUHNFRLBOZBNXZNNAUUANDJPISVSYSHDSOBMGTFMZJUPFBIZQBVRIUOVBSSCCBYOBLFOFPYEBYSFYHKRLPFCFZZCBVFVALBLDT

慕设计2395807

YNJG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