Skip to main content

Repository Layer

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

Fresher Notes Repository layer is the part of the app that stores and loads data; services call it and never write SQL themselves. Spring Data JPA lets you declare an interface that extends JpaRepository , and Spring generates the implementation at startup. Annotation : @Repository marks the bean and translates persistence exceptions into DataAccessException .

More lessons in Layered Architecture