Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
package fr.frin.spring;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
/**
* Controleur
*
* @author Ludovic FRIN
*/
@Controller
@RequestMapping("/entity")
public class EntityController {
@RequestMapping(method=RequestMethod.GET)
public @ResponseBody List<Entity> read() {
}
@RequestMapping(method=RequestMethod.GET, value="{id}")
public @ResponseBody List<Entity> read(@PathVariable Long id) {
}
@RequestMapping(method=RequestMethod.POST)
public @ResponseBody List<Entity> post(@RequestBody Entity entity) {
}
@RequestMapping(method=RequestMethod.DELETE, value="{id}")
public @ResponseBody List<Entity> delete(@PathVariable Long id) {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.