Skip to content

Instantly share code, notes, and snippets.

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
public class EntityController {
public @ResponseBody List<Entity> read() {
@RequestMapping(method=RequestMethod.GET, value="{id}")
public @ResponseBody List<Entity> read(@PathVariable Long id) {
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.