MCPcopy Create free account
hub / github.com/castello/spring_basic / toDate

Method toDate

ch3/RegisterController.java:24–31  ·  view source on GitHub ↗
(WebDataBinder binder)

Source from the content-addressed store, hash-verified

22public class RegisterController {
23
24 @InitBinder
25 public void toDate(WebDataBinder binder) {
26 SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
27 binder.registerCustomEditor(Date.class, new CustomDateEditor(df, false));
28 binder.setValidator(new UserValidator()); // UserValidator를 WebDataBinder의 로컬 validator로 등록
29 // List<Validator> validatorList = binder.getValidators();
30 // System.out.println("validatorList="+validatorList);
31 }
32
33 @GetMapping("/add")
34 public String register() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected