New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate to new Spring Boot auto configuration introduced in spring bo… #1778
Conversation
I don't think there is a way to be backwards compatible with spring boot 2.6. The support has not been removed yet in spring boot 3 so it still works there. See. #29699 and #29698. So I think that there needs to be a separate module for spring 3 if your aim is to be backwards compatible with spring boot 2.6. |
I prefer not to have separate modules for Spring 2.6 and 2.7/3.x... Would it be possible to support both mechanisms? So, we don't remove picocli-spring-boot-starter/src/main/resources/META-INF/spring.factories --> this will allow it to work with Spring 2.6 and earlier And we add picocli-spring-boot-starter/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports --> this will allow it to work with Spring 2.7 and later Can I ask you to test whether that approach would allow us to support both Spring 2.6 and 2.7/3.x? |
We've had a similar request (registering the auto-configuration in both Edit: actually I've just saw a comment that states it will work. So do not remove the entries in |
Awesome, thank you @snicoll! 🙏😊 |
@aspan Will you be able to make these changes? |
I'll make the changes today. |
…ot 2.7. The existing spring.factories support will be removed in spring boot 3 so this will make sure that the autoconfiguration will still work in when upgrading to spring boot 3.
…annotation to @configuration(proxyBeanMethods = false) since @autoConfiguration is not available in spring boot 2.6.
Merged. Thank you for the pull request! |
* Add support for new Spring Boot auto configuration introduced in Spring Boot 2.7
…ot 2.7. The existing spring.factories support will be removed in spring boot 3 so this will make sure that the autoconfiguration will still work in when upgrading to spring boot 3.