Skip to content

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.

2 participants