Closed
Description
Overview
Since -parameters
is required for certain use cases starting with Spring Framework 6.1, we should revise related exception messages to explicitly mention the solution.
For example, a Spring MVC @Controller
handler method with a @PathVariable String client
parameter declaration may fail with an exception similar to the following.
java.lang.IllegalArgumentException: Name for argument of type [java.lang.String] not specified, and parameter name information not found in class file either.
To improve diagnostics, we should add something along the lines of Ensure that the compiler uses the -parameters flag.
to the end of that exception message.
Related Issues
- Deprecate
LocalVariableTableParameterNameDiscoverer
completely (avoiding its exposure in native images) #29531 - Remove LocalVariableTableParameterNameDiscoverer #29559
NoUniqueBeanDefinitionException
when constructor/setter parameter name used as qualifier #31643- SpEL cannot evaluate after update from 6.0.13 to 6.1.1 #31666
- Properties-driven path throws IllegalArgumentException #31671
- Dependency injection in
@Bean
method with qualifier based on parameter name doesn't work in Spring 6.1 #31685 - IllegalArgumentException: Null key returned for cache operation #31729
- spring scanning same type bean with different names returning ambiguous exception after upgrading to spring-boot 3.2 #31743