spring-native
spring-native copied to clipboard
ConfigurationPropertiesBinder.Factory is exposed as a bean but not used to create ConfigurationPropertiesBinder
As discovered reviewing an issue in mybatis, Spring Boot uses a supplier to instantiate ConfigurationPropertiesBinder so that resolution for the ApplicationContext does not trigger early init of factory beans.
Unfortunately, we can't see what a supplier is doing and we're applying our fallback of trying to create the bean with the constructor and declared parameters. It worked so far but, with the early initialization.
We need to find a way to fix this in a generic fashion going forward but, for now, I think we can write a custom writer to avoid the problem.
This introduced a regression so the change has been reverted and will be revisited.
@snicoll Probably, the mybatis-spring-natvie seems to work fine with the latest 0.11.2 SNAPSHOT. See https://github.com/kazuki43zoo/mybatis-spring-native/runs/4930626598?check_suite_focus=true
Yes, this is to be expected. The fix that I've added for MapperFactoryBean makes this issue not important for you.
Spring Native is now superseded by Spring Boot 3 official native support, see the related reference documentation for more details.
As a consequence, I am closing this issue, and recommend trying your use case with latest Spring Boot 3 version. If you still experience the issue reported here, please open an issue directly on the related Spring project (Spring Framework, Data, Security, Boot, Cloud, etc.) with a reproducer.
Thanks for your contribution on the experimental Spring Native project, we hope you will enjoy the official native support introduced by Spring Boot 3.