Remove AutoConfiguration.imports and revert spring.factories for Spring Boot 2 #5279
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation:
org.springframework.boot.autoconfigure.AutoConfiguration.imports
was introduced in Spring Boot 2.7. The legacyspring.factories
files in Spring integration modules have been migrated toAutoConfiguration.imports
to share the same files between Spring Boot 2 and 3.Some uses are still using old Spring Boot versions (< 2.7) so they are having trouble upgrading Armeria version due to the removal of
spring.factories
.spring.factories
is still supported in 2.7. For backward compatibility, the legacyspring.factories
is a better to provide auto-configuration in the Spring Boot 2 modules.Modifications:
spring.factories
and do not copyAutoConfiguration.imports
from Spring Boot 3 modules.Result:
Fixed a bug where Armeria Spring integration is not compatible with Spring Boot 2.6 and lower.