Tôi xác nhận thuộc tính đến, nhưng validator bắt ngay cả những trang khác không chú thích với @Valid
xác nhận mùa xuân với @Valid
@RequestMapping(value = "/showMatches.spr", method = RequestMethod.GET)
public ModelAndView showMatchPage(@ModelAttribute IdCommand idCommand)
//etc
Khi tôi truy cập trang /showMatches.spr
tôi nhận được lỗi org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.IllegalStateException: Invalid target for Validator [[email protected]]: [email protected]
,
Các validator doesn' Tôi chấp nhận nó, nhưng tôi không muốn nó xác nhận! Bởi validator này:
protected void initBinder(WebDataBinder binder) {
binder.setValidator(new Validator() {
// etc.
}