Y
Y
Yourmind2019-09-27 13:32:46
Java
Yourmind, 2019-09-27 13:32:46

Repository is a DAO layer?

I have some username

@Entity
public class User {
    @Id
    private String login;
    private String phone;
...}

I create a repository in it, layered from CrudRepository, which automatically provides me with many functions
@Repository
public  interface  UserRepository extends CrudRepository<Record, Integer> {
...
}

Next comes the service class where the business logic with this class is involved.
Judging by this scheme, is the UserRepository class a DAO layer?
I was told that the DAO layer will be between the UserRepository class and its service. And what should it look like then?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question