Skip to content
This repository was archived by the owner on Apr 4, 2025. It is now read-only.
This repository was archived by the owner on Apr 4, 2025. It is now read-only.

How to configure additional Datasource for Spring Session #96

Open
@visweshwar

Description

@visweshwar

I'm trying to route all session information to a dedicated datasource for session information. What I notice is that all the collections get written to the primary datasource even though there is a dedicated secondary datasource.

https://github.com/visweshwar/spring-session-multiple-mongo

Expected behavior

Collections should go to the second data source

Actual behavior

Spring session always goes to primary data source

Steps to reproduce

Run the application and you'll see the session collection getting created under first database.

Reactor Netty version

JVM version (e.g. java -version)

java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)

OS version (e.g. uname -a)

Darwin-MacBook-Pro.local 18.5.0 Darwin Kernel Version 18.5.0: Mon Mar 11 20:40:32 PDT 2019; root:xnu-4903.251.3~3/RELEASE_X86_64 x86_64

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions