Skip to main content

DAO Pattern

Learn DAO Pattern (Spring MVC + Database, 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 for one entity, so the rest of the code never sees SQL or JDBC. Typical methods are findById , findAll , insert , update and delete . @Repository marks a DAO class and enables translation of SQL errors into Spring DataAccessException .

More lessons in Spring MVC + Database