Guest User

Untitled

a guest
Jun 22nd, 2018
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. @RestController
  2. @RequestMapping("/sample")
  3. public class SampleController {
  4.  
  5. @InitBinder("SampleGet")
  6. public void initBinder(WebDataBinder binder) {
  7. binder.addCustomFormatter(new TestFormatter());
  8. }
  9.  
  10. @GetMapping("{id}")
  11. public Map<String, String> get(Model model, @PathVariable("id") Integer id) {
  12. ...
  13. }
  14.  
  15. @GetMapping
  16. public SampleGetRequest list(@ModelAttribute("SampleGet") SampleGetRequest request) {
  17. return request;
  18. }
  19. }
Add Comment
Please, Sign In to add comment