mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-10-03 21:49:03 +00:00
Ignore @Value on record property
See gh-31433
This commit is contained in:
committed by
Stéphane Nicoll
parent
6ec264252b
commit
70cb96c1d8
+1
-1
@@ -581,7 +581,7 @@ public class AutowiredAnnotationBeanPostProcessor implements SmartInstantiationA
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (method.getParameterCount() == 0) {
|
||||
if (!method.getDeclaringClass().isRecord() && method.getParameterCount() == 0) {
|
||||
if (logger.isInfoEnabled()) {
|
||||
logger.info("Autowired annotation should only be used on methods with parameters: " +
|
||||
method);
|
||||
|
||||
Reference in New Issue
Block a user