Spring Data JPA
Introduction to Spring Data JPA and Spring Data Commons
- Introduction to JPA
- Understanding of JpaQL and SQL.
- Understanding of ORM
- A workstation running Windows, Linux, or Mac OS.
- LDS Tech or other IDE installed.
- Stack Pet Store Admin Web project installed and ready to use (see section below).
- Java JDK 1.6+
- Internet Connection (Specifically to the LDS Pet Store Development Database)
Getting Pet Store Admin Web Setup
- Check Out as a Maven Project into your IDE - Pet Store 3.3.1 tag ( https://code.lds.org/svn/stack/modules/pet-store/tags/3.3.1 )
- Locate the property files located in stack-pet-store-admin-web/src/test/resources/testenv. You should see a default.properties and a dev.properties. Open the dev.properties and copy the 3 properties and paste them in the default.properties file. Make sure you remove or overwrite the existing properties in default.properties with the new dev.properties and save the file. This step is switching your local test environment to use the Pet Store Development Oracle database instead of a local XE Oracle database.
- Open the AnimalRepositoryIT test located in the stack-pet-store-admin-web/src/test/java/org/lds/stack/petstore/admin/repository folder (package).
- Run the AnimalRepositoryIT test as a TestNG test. If everything passes then you are setup and ready for the class. Otherwise make sure that the project and your IDE are setup correctly and you are able to access the Stack Pet Store Development database.
Introduction To Spring Data JPA
- Training Overview
- What is Spring Data JPA?
- Where we’ve been to get here
- Spring Data JPA Pros and Cons
- Setting up Spring Data JPA in a project
- Lab 1 (Send email in own words describing what Spring Data JPA is)
Spring Data JPA in Depth
- Repositories vs. Services
- Spring Data JPA Repositories
- DSL Queries
- Lab 2 (Add DSL Queries to AnimalRepository)
- Using @Query
- Using @query with native queries
- Lab 3 (Add @Query to AnimalRepository)
- Lab 4 (Add paging example to AnimalRepository)
Replacing LDS ServiceProxy with JPA Repositories
- Reducing Query Code
- Migration Strategy