Last active
February 2, 2016 09:32
-
-
Save ludovicfrin/88b9fbbc1a6519e65e74 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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