Close
« Tutorial

Spring MVC - @InitBinder MCQ

0/13
0 ✓
0 ✗

1. What is the main purpose of the @InitBinder annotation in Spring MVC?

2. Which annotation should be added to the method below to customize data binding?

@Controller
public class MyController {

    // Add annotation here
    public void customize(WebDataBinder binder) {
    }
}

3. Which kinds of data can be customized by using @InitBinder?

4. Where do we normally place an @InitBinder method?

5. Which argument type is typically passed to an @InitBinder method to configure binding?

6. What should be the return type of an @InitBinder method?

7. Which argument types are not supported by an @InitBinder method?

8. What is the relationship between WebDataBinder and DataBinder?

9. What can we register with a WebDataBinder?

10. Which WebDataBinder method is used to register a custom PropertyEditor?

11. What is a PropertyEditor mainly used for in data binding?

12. What is CustomDateEditor used for?

13. When is an @InitBinder method called if its value element is not specified?

14. What does Spring pass to an @InitBinder method each time it is called?

15. What does the value element of @InitBinder do?

16. A controller has a method annotated with @InitBinder("user"). When is this method applied?

17. Can one controller have more than one @InitBinder method?

Join