我正在实现一个将成为微服务的Spring Boot应用程序。
此微服务应该在@RestController
上定义 CRUD CMS
。
有没有任何标准方法可以做到这一点,或者我可以利用哪些库?
即:
@RequestMapping(value = "/simple/{key}", method = RequestMethod.GET)
public String getKey(@PathVariable final String key) {
return getCmsKey(key);//Retrieve key
}
@RequestMapping(value = "/collection/{key}", method = RequestMethod.GET)
public List<String> getKeys(@PathVariable final String key) {
return getCmsListOfKeys(keys);//Retrieve collection of keys
}