You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Framework 6.2 has introduced support for @Bean(defaultCandidate=false) which allows a bean to be declared such that it can only be injected where further constraints, such as a qualifier, are specified.
There are places in the documentation where we currently recommend declaring one bean with @Primary and a second bean with a qualifier, for example when configuring a Batch data source using @BatchDataSource or a Batch transaction manager using @BatchTransactionManager. We should review such documentation and consider recommending a single bean with both the qualifier and @Bean(defaultCandidate=false). A benefit of this over the current recommendation is that it allows any auto-configured bean of the same type to remain in place.
Note that the defaultCandidate=false approach won't work until we've upgraded to Framework 6.2.0 due to spring-projects/spring-framework#33762. As such, we should wait until after 3.4.0-RC1 and moving onto Framework snapshots before updating our docs.
The text was updated successfully, but these errors were encountered:
Framework 6.2 has introduced support for
@Bean(defaultCandidate=false)
which allows a bean to be declared such that it can only be injected where further constraints, such as a qualifier, are specified.There are places in the documentation where we currently recommend declaring one bean with
@Primary
and a second bean with a qualifier, for example when configuring a Batch data source using@BatchDataSource
or a Batch transaction manager using@BatchTransactionManager
. We should review such documentation and consider recommending a single bean with both the qualifier and@Bean(defaultCandidate=false)
. A benefit of this over the current recommendation is that it allows any auto-configured bean of the same type to remain in place.Note that the
defaultCandidate=false
approach won't work until we've upgraded to Framework 6.2.0 due to spring-projects/spring-framework#33762. As such, we should wait until after 3.4.0-RC1 and moving onto Framework snapshots before updating our docs.The text was updated successfully, but these errors were encountered: