首页 > 技术文章 > feign.FeignException: status 404 reading xxService#xxmethod

artwalker 2020-07-03 13:20 原文

做乐优商城授权中心出错

public interface UserApi {

    @GetMapping("query")
    public User queryUser(
            @RequestParam("username") String username,
            @RequestParam("password") String password);
}

这个接口上边有@RequestMapping("user"),但是user模块的controller并没有这个注解,要加都加,要不加都不加,因为controller还有很多方法是不带这个user路径的,所以去掉这个路径,以后要注意哦!

推荐阅读