Skip to content

Instantly share code, notes, and snippets.

@ludovicfrin
Last active February 2, 2016 09:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ludovicfrin/88b9fbbc1a6519e65e74 to your computer and use it in GitHub Desktop.
Save ludovicfrin/88b9fbbc1a6519e65e74 to your computer and use it in GitHub Desktop.
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