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

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -