Skip to content

Multi datasource #1

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

Merged
merged 8 commits into from
Jan 1, 2020
Merged

Multi datasource #1

merged 8 commits into from
Jan 1, 2020

Conversation

visweshwar
Copy link
Member

By default spring-session-data-mongodb assumes that the datasource in the project is exclusively used by spring session. If you have more than 1 dataSource, the very first bean gets elected to the primary Datasource for session. This is less than ideal. To account for this I've added an annotation to optionally elect the datasource of choice.

Expected behavior

The MongoTemplate annotated with SpringSessionMongoOperations will be chosen as the Session Datasource

Actual behavior

Currently the first Bean gets resolved as the MongoOperations of choice.

Steps to reproduce

https://github.com/visweshwar/spring-session-multiple-mongo can reproduce the issue.

@visweshwar visweshwar requested review from a team and removed request for a team June 2, 2019 02:39
@visweshwar visweshwar requested a review from a team June 2, 2019 02:57
@visweshwar visweshwar merged commit f5805e8 into master Jan 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant