Customizing Spring Data repository bean names for use with multiple data sources

后端 未结 2 2043
死守一世寂寞
死守一世寂寞 2021-01-02 03:39

I have a project that utilizes Spring Data (MongoDB in this instance) to interact with multiple databases with the same schema. What this means is that each database utiliz

2条回答
  •  佛祖请我去吃肉
    2021-01-02 03:51

    For a general @Repository you can just add (value="someDao") to name the created Bean, if the MongoRepository extends Repository this should work.

提交回复
热议问题