Spring HATEOAS 是一个用于支持实现超文本驱动的 REST Web 服务的开发库。是 HATEOAS 的实现。
示例代码:
@Controller
@RequestMapping("/people")
class PersonController {
@RequestMapping(method = RequestMethod.GET)
public HTTPEntIty showAll() { … }
@RequestMapping(value = "/{person}", method = RequestMethod.GET)
public HttpEntity show(@PathVariable Long person) { … }
}
发布于 2016-12-25 15:54:56 | 148 次阅读