From the course: Spring: Design Patterns
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
The Repository pattern
- [Instructor] The Repository Pattern is a data access pattern that you'll see littered all throughout the Spring framework, and specifically the Spring Data Project. And as I alluded to, most of Spring data is actually based entirely on the Repository Pattern. Spring JDBC can also be used to create Repository actions when you implement the Repository yourself. RepositoryRestResource adds a RESTful web service on top of a raw repository, which gets into this very interesting use case of an interface exposing an entire web service through the use of reflection and convention of naming. So let's talk a little bit about the Repository Pattern itself. First and foremost, it's important to note that this is not a Gang of Four pattern. In fact, it was introduced in a book by Eric Evans called Domain-Driven Design, and one that we use often in the distributed world, which is where I tend to spend most of my time. A simple operation of an entity or business object without the knowledge of…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.