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

Fail fast if a @Bean method declares @Autowired as well #33051

Closed
jhoeller opened this issue Jun 17, 2024 · 3 comments
Closed

Fail fast if a @Bean method declares @Autowired as well #33051

jhoeller opened this issue Jun 17, 2024 · 3 comments
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Milestone

Comments

@jhoeller
Copy link
Contributor

Along the lines of #31007 in 6.1, we intend to tighten @Bean processing further in 6.2: rejecting an accidental @Autowired annotation on a @Bean method, following up on #33030.

@jhoeller jhoeller added in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement labels Jun 17, 2024
@jhoeller jhoeller added this to the 6.2.0-M5 milestone Jun 17, 2024
@jhoeller jhoeller self-assigned this Jun 17, 2024
@sbrannen
Copy link
Member

This is also similar to what we decided to do on the testing side.

@xgwcy
Copy link

xgwcy commented Jun 22, 2024

niu bi

@rishiraj88
Copy link

Very nice and to-be-useful enhancement. Thanks for thinking upon and starting it, @jhoeller .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

4 participants