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

use Constructor injection replace @Autowired(required = false) #3617

Merged
merged 3 commits into from
Mar 7, 2024

Conversation

springboot4
Copy link

Describe what this PR does / why we need it

Spring推荐使用构造器注入。编译器对于@Autowired(required = false)也会出现警告。
此pr在不改变原有api以及代码功能的前提下,使用构造器注入以及ObjectProvider替换了三个自动配置类中的@Autowired(required = false)。

@CLAassistant
Copy link

CLAassistant commented Feb 1, 2024

CLA assistant check
All committers have signed the CLA.

Copy link
Collaborator

@ruansheng8 ruansheng8 left a comment

Choose a reason for hiding this comment

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

LGTM.

Copy link
Collaborator

@yuluo-yx yuluo-yx left a comment

Choose a reason for hiding this comment

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

LGTM.

@ruansheng8 ruansheng8 merged commit 4c00ada into alibaba:2022.x Mar 7, 2024
4 checks passed
@ruansheng8 ruansheng8 added the waiting for sync waiting for sync to other main branchs label Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting for sync waiting for sync to other main branchs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants