1

I have following initBinder in my ControllerAdvice class

 @InitBinder
    public void initBinder(WebDataBinder binder) {
        binder.registerCustomEditor(String.class, new StringTrimmerEditor(true));
        binder.registerCustomEditor(String.class, new HtmlEscapeStringEditor());
    }

String trimmer stopped working when I added HtmlEscapeStringEditor to my init binder. Is there any way how to register multiple custom editores over one class?

Thanks for answers

1 Answer 1

2

Perhaps not the most elegant solution, but it worked for me. I have created new class that combined functionalities of both HtmlEscapeStringEditor and StringTrimmerEditor

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.