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

feat:升级自动装配的方式 #4843

Closed
wants to merge 1 commit into from
Closed

feat:升级自动装配的方式 #4843

wants to merge 1 commit into from

Conversation

livk-cloud
Copy link

该Pull Request关联的Issue

(#4842)[https://github.com//issues/4842]

修改描述

升级springboot自动装配

测试用例

gradle测试用例

修复效果的截屏

@huayanYu
Copy link
Member

直接删了老版本的springboot能支持么?

@livk-cloud
Copy link
Author

livk-cloud commented Sep 23, 2022

直接删了老版本的springboot能支持么?

这个是从springboot 2.7开始的自动装配,最低需要版本就是2.7 wiki
image
SpringBoot-M5开始废弃了老版本的自动装配

@huayanYu
Copy link
Member

那你就无法支持老用户的升级了, 还有大量用户用的是2.3 2.4 之类的

@livk-cloud
Copy link
Author

那你就无法支持老用户的升级了, 还有大量用户用的是2.3 2.4 之类的

有折中的办法,就是不删除spring.factories里的自动装配,同时添加新的自动装配的文件

@@ -1,7 +1,3 @@
# Auto Configure
org.springframework.boot.env.EnvironmentPostProcessor=\
com.baomidou.mybatisplus.autoconfigure.SafetyEncryptProcessor
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
Copy link
Contributor

Choose a reason for hiding this comment

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

-1, I don't agree with this change, it breaks compatibility with Springboot OSS < 2.7.0, it should be kept. Reference remkop/picocli#1778 (comment) .

Copy link
Author

Choose a reason for hiding this comment

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

就目前而言,我觉得也可以不删除,但是springboot3已经删除了这个装配的方式#29699

Copy link
Contributor

Choose a reason for hiding this comment

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

  • Yes, I meant to have the new file exist alongside the auto-config section of spring.factories.

Copy link
Contributor

@linghengqian linghengqian left a comment

Choose a reason for hiding this comment

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

  • If this PR is not updated, I will submit a new PR in these days to fix the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants