Skip to content
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

Remove AutoConfiguration.imports and revert spring.factories for Spring Boot 2 #5279

Merged
merged 1 commit into from Nov 8, 2023

Conversation

ikhoon
Copy link
Contributor

@ikhoon ikhoon commented Nov 1, 2023

Motivation:

org.springframework.boot.autoconfigure.AutoConfiguration.imports was introduced in Spring Boot 2.7. The legacy spring.factories files in Spring integration modules have been migrated to
AutoConfiguration.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 legacy spring.factories is a better to provide auto-configuration in the Spring Boot 2 modules.

Modifications:

  • Revive spring.factories and do not copy AutoConfiguration.imports from Spring Boot 3 modules.

Result:

Fixed a bug where Armeria Spring integration is not compatible with Spring Boot 2.6 and lower.

…ng Boot 2

Motivation:

`org.springframework.boot.autoconfigure.AutoConfiguration.imports` was
introduced in Spring Boot 2.7. The legacy `spring.factories` files in
Spring integration modules have been migrated to
`AutoConfiguration.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 legacy `spring.factories` is a better to
provide auto-configuration in the Spring Boot 2 modules.

Modifications:

- Revive `spring.factories` and do not copy `AutoConfiguration.imports`
  from Spring Boot 3 modules.

Result:

Fixed a bug where Armeria Spring integration is not compatible with
Spring Boot 2.6 and lower.
@ikhoon ikhoon added the defect label Nov 1, 2023
@ikhoon ikhoon added this to the 1.26.2 milestone Nov 1, 2023
Copy link
Contributor

@jrhee17 jrhee17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Manually checked out, compared each file. Thanks @ikhoon ! 🙇 👍 🙇

Copy link
Member

@minwoox minwoox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Copy link
Member

@trustin trustin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@trustin trustin merged commit 8b24aa0 into line:main Nov 8, 2023
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants