@Bean
method that declares @Autowired
/@Qualifier
use case no longer supported
#33990
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
status: invalid
An issue that we don't feel is valid
Uh oh!
There was an error while loading. Please reload this page.
Overview
@Bean
method declares@Autowired
as well #33051The change to prevent
@Autowired
on a@Bean
method prevents the following use case.Before I go change all the code to reflect the new limitations I want to make sure this was an intended side effect.
Use Case
Create an annotation like:
Use the annotation when setting up
@Configuration
.Use the annotation in a variety of contexts.
After this change I will remove
@Autowired
from the annotation class and selectively add toFieldInjected
andSetterInjected
use cases.My question is:
Was the change worth it?
Or is it worth undoing the change to save me and others from having to rework our code bases?
I'll refactor everywhere if I need to, but it didn't look like #33051 discussed this side effect.
The text was updated successfully, but these errors were encountered: