@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...