I use Spring Data Repository
@Repository
public interface SomeRepository extends CrudRepository<Some, Long> {
}
And I have some jdbs methods for Some entity. Big select with joins and etc. I implement it by NamedParameterJdbcTemplate
And I have 2 point for get data from DB:
SomeRepositorySomeDAO(with native query, big selects)
How can I combine it?
I have 2 ways:
SomeServiceinjectSomeRepositoryandSomeDAOSomeDAOinjectSomeRepositoryand have own methods and wrapp SomeRepository methods for CRUD