Align with ConfigurationPropertiesBinder and ConfigurationPropertiesBindingPostProcessor
Comment From: quaff
There are several places are using genericBeanDefinition(), but rootBeanDefinition() is more common in Spring Boot codebase, I would like to amend this PR if the team think it's worthy to change them also.
Comment From: quaff
Spring Framework recommend to use RootBeanDefinition if it's pre-determined as root bean.
see https://github.com/spring-projects/spring-framework/blob/3f889e997cb8648f54e034c29e009960e8a086e3/spring-beans/src/main/java/org/springframework/beans/factory/support/GenericBeanDefinition.java#L32-L34
Comment From: snicoll
Yes, RootBeanDefinition is indeed recommended as the framework will built one internally via the merge process. So having it from the get go allows to skip that bit. There are places were we can't use it though. If you still want to amend this PR to use RBD, please let us know.
Comment From: quaff
Yes,
RootBeanDefinitionis indeed recommended as the framework will built one internally via the merge process. So having it from the get go allows to skip that bit. There are places were we can't use it though. If you still want to amend this PR to use RBD, please let us know.
I will amend it later.
Comment From: quaff
> Task :spring-boot-project:spring-boot-actuator:compileJava
/home/runner/work/spring-boot/spring-boot/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/reactive/AbstractWebFluxEndpointHandlerMapping.java:527: warning: [deprecation] check(Supplier<Authentication>,T) in AuthorityAuthorizationManager has been deprecated
.check(this::getAuthentication, null)
^
where T is a type-variable:
T extends Object declared in class AuthorityAuthorizationManager
error: warnings found and -Werror specified
1 error
1 warning
> Task :spring-boot-project:spring-boot-actuator:compileJava FAILED
It's weird, this task works on my machine.
Comment From: quaff
```
Task :spring-boot-project:spring-boot-actuator:compileJava /home/runner/work/spring-boot/spring-boot/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/reactive/AbstractWebFluxEndpointHandlerMapping.java:527: warning: [deprecation] check(Supplier
,T) in AuthorityAuthorizationManager has been deprecated .check(this::getAuthentication, null) ^ where T is a type-variable: T extends Object declared in class AuthorityAuthorizationManager error: warnings found and -Werror specified 1 error 1 warning Task :spring-boot-project:spring-boot-actuator:compileJava FAILED ```
It's weird, this task works on my machine.
Fixed by #42679