Created
June 21, 2018 10:22
-
-
Save b1a9id/f8fced9c18a7df7586e81adee85c4e5c to your computer and use it in GitHub Desktop.
SampleController
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
@RestController | |
@RequestMapping("/sample") | |
public class SampleController { | |
@InitBinder("SampleGet") | |
public void initBinder(WebDataBinder binder) { | |
binder.addCustomFormatter(new TestFormatter()); | |
} | |
@GetMapping("{id}") | |
public Map<String, String> get(Model model, @PathVariable("id") Integer id) { | |
... | |
} | |
@GetMapping | |
public SampleGetRequest list(@ModelAttribute("SampleGet") SampleGetRequest request) { | |
return request; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment