java - How to set a specific DataSource for a Repository? -


is possible assign specific datasource @repository?

i'd create test environment in general want use test-datasource, few crudrepository should operate on different db (the production db; read-only operations).

can tell spring datasource use repository explicit?

public interface myrepository extends crudrepository<customer, long> {}

@enablejparepositories answer question. should work crudrepository according informal documentations.

refer detail tutorial on how this. didn't put effort post codes here may directly refer clearer in it.

link tutorial...


Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -