How to set a specific DataSource for a Repository?

前端 未结 4 1161
半阙折子戏
半阙折子戏 2021-01-04 18:43

Is it possible to assign a specific DataSource to a @Repository?

I\'d like to create a test environment where in general I want to use the

4条回答
  •  萌比男神i
    2021-01-04 19:22

    @EnableJpaRepositories is the answer to your question. This should work with CrudRepository according to the informal documentations.

    Refer this detail tutorial on how to do this. I didn't put my effort to post the codes here as you may directly refer it much clearer in it.

    link to the Tutorial...

提交回复
热议问题