Skip to main content

DAO Layer

Learn DAO Layer (Layered Architecture, Spring MVC) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

Fresher Notes DAO (Data Access Object) is a class that holds all database access code for one entity, so the rest of the app never sees JDBC or SQL. Purpose : change the database or the query style by editing only the DAO, not the service or the controller. Spring support : mark a DAO class with @Repository and use JdbcTemplate or EntityManager inside it.

More lessons in Layered Architecture