Close
« Tutorial

Spring MVC - Automatic Parameter Names Discovery MCQ

0/13
0 ✓
0 ✗

1. What is the main purpose of ParameterNameDiscoverer in Spring MVC?

2. Which two compiler options allow Spring MVC to resolve method parameter names?

3. What is the default implementation of ParameterNameDiscoverer used by Spring?

4. Which discoverer does DefaultParameterNameDiscoverer try first?

5. What does StandardReflectionParameterNameDiscoverer rely on to find parameter names?

6. What does LocalVariableTableParameterNameDiscoverer rely on to find parameter names?

7. What happens if StandardReflectionParameterNameDiscoverer returns null for a parameter name?

8. Why did many Spring MVC projects work without special compiler flags before Spring 6.1?

9. What changed in Spring 6.1 regarding parameter name discovery?

10. What error occurs when parameter name information is not available in the class file?

11. Can LocalVariableTableParameterNameDiscoverer be used outside of the Spring container?

12. What does Parameter#getName() return if the code is NOT compiled with the -parameters flag?

13. What does the Maven compiler plugin do by default regarding debug information?

14. What is recommended for projects relying on automatic parameter name discovery to avoid future breakage?

15. With the -parameters flag enabled, which discoverer handles parameter name resolution more reliably?

16. What is the easiest fix if you see parameter name errors after upgrading to Spring 6.1?

17. Which annotation is used in a controller method to automatically bind a query parameter without explicitly specifying its name?

@RequestMapping("/user")
public String test(String name) { ... }

18. Which Spring interface is responsible for finding parameter names from a method?

19. What information does DefaultParameterNameDiscoverer use as a fallback if reflection-based discovery fails?

20. Which type of application is most affected by the removal of automatic parameter name discovery in Spring 6.1?

Join