全局和局部 initBinder @InitBinder注解定义的方法不仅可以在 Controller 中添加,还可以在@ControllerAdvice定义的类中: @ControllerAdvice private static class MyControllerAdvice { @InitBinder public void globalInitBinder(WebDataBinder binder) { } } Controller 中的 InitBinder 方法仅对所在的 Contro…