API in Spring Boot Repository vs DAO API in Spring Boot Repository vs DAO spring spring

API in Spring Boot Repository vs DAO


If I understood correctly your question, the whole point of using Spring Service/Repository is to separate the business logic from the Controller to the Service class, and the only thing the Repository will do is DB operations, and you will inject it in your Service. There is no difference between DAO (assuming your DAO is a bunch of code using JPA) and Repository, but with Spring Repository you can use Query Methods, which is awesome!

Any suggestion, feel free!