Reputation: 880
Currently I am working on a Spring Hibernate project where I created Hibernate entities Company.java, Group.java, Host.java
I have grouped them in a folder called Entities.
I am also using Spring data repository interfaces for those entities. Currently, the names are CompanyRepository.java, GroupRepository.java, HostRepository.java (Not sure if this the correct name scheme).
Should those repositories be in the same folder as the entities or should I create a new folder for any Spring data repository?
Thanks.
Upvotes: 0
Views: 400
Reputation: 1752
The package of your repositories can be anything you want, either the same as your Entities or not. There is no obligation to do one over the other.
That being said, it would be probably be more convenient to have them under their own package
Upvotes: 2