Skip to content

Conversation

@vpavic
Copy link
Contributor

@vpavic vpavic commented Nov 16, 2021

With the present example, the secondDataSource bean factory method will use firstDataSourceProperties due to it being annotated with @Primary.

This commit adds the @Qualifier needed to ensure secondDataSource bean factory method uses secondDataSourceProperties.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Nov 16, 2021
With the present example, the `secondDataSource` bean factory method will use `firstDataSourceProperties` due to it being annotated with `@Primary`. This commit adds the `@Qualifier` needed to ensure `secondDataSource` bean factory method uses `secondDataSourceProperties`.
@vpavic vpavic force-pushed the fix-two-datasource-example branch from c9b6f0d to 0856616 Compare November 16, 2021 23:15
@snicoll snicoll added type: documentation A documentation update and removed status: waiting-for-triage An issue we've not yet triaged labels Nov 17, 2021
@snicoll snicoll self-assigned this Nov 17, 2021
@snicoll snicoll added this to the 2.5.7 milestone Nov 17, 2021
snicoll pushed a commit that referenced this pull request Nov 17, 2021
With the present example, the `secondDataSource` bean factory method will use `firstDataSourceProperties` due to it being annotated with `@Primary`. This commit adds the `@Qualifier` needed to ensure `secondDataSource` bean factory method uses `secondDataSourceProperties`. See gh-28712
@snicoll snicoll closed this in 663d5d4 Nov 17, 2021
@snicoll
Copy link
Member

snicoll commented Nov 17, 2021

Good catch, thanks Vedran!

@vpavic vpavic deleted the fix-two-datasource-example branch November 17, 2021 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: documentation A documentation update

3 participants