# feign-springmvc **Repository Path**: woolianhy/feign-springmvc ## Basic Information - **Project Name**: feign-springmvc - **Description**: 可以用springmvc 注解描述要调用的rest服务. - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 3 - **Created**: 2017-03-28 - **Last Updated**: 2021-07-08 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README #feign-springmvc > 支持以springmvc注解描述出要调用的rest接口 example @RequestMapping(value="/user") public interface UserService { @RequestMapping(value = "/{id}", method = RequestMethod.GET) User selectByPrimaryKey( @PathVariable("id") Integer id); @RequestMapping(value = "/list", method = RequestMethod.GET) List list(); @RequestMapping(value = "/{id}", method = RequestMethod.DELETE) int deleteByPrimaryKey(@PathVariable("id") Integer id); @RequestMapping(method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE) int insert(@RequestBody User user); @RequestMapping(method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE) int updateByPrimaryKey(@RequestBody User user); } UserService commentService =SpringMvcFeign.target(UserService.class, "http://localhost:8080");