023 FeignClient url调用配置文件

1.Fegin通过配置"${fegin.epf-admin}"

@FeignClient(value = "epf-admin",url = "${fegin.epf-admin}" )
public interface IAdminService {

    @RequestMapping(value = "/admin/user/geUserInfoById", method = RequestMethod.GET)
    public UserEntity geUserInfoById(@RequestParam("id")String id);

}

2.配置文件配置参数

fegin:
  epf-admin: http://127.0.0.1:8183
发布了125 篇原创文章 · 获赞 5 · 访问量 5万+

猜你喜欢

转载自blog.csdn.net/HuanFengZhiQiu/article/details/103774306