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.
Comments
Post a Comment