Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @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;
- }
- }
Add Comment
Please, Sign In to add comment