Getting started with spring-data-jpa
Remarks#
This section provides an overview of what spring-data-jpa is, and why a developer might want to use it.
It should also mention any large subjects within spring-data-jpa, and link out to the related topics. Since the Documentation for spring-data-jpa is new, you may need to create initial versions of those related topics.
Versions#
Version | Release Date |
---|---|
1.9.0.RELEASE | 2015-09-01 |
1.8.0.RELEASE | 2015-03-23 |
1.7.0.RELEASE | 2014-09-05 |
1.6.0.RELEASE | 2014-05-20 |
1.5.0.RELEASE | 2014-02-24 |
1.4.0.RELEASE | 2013-09-09 |
1.3.0.RELEASE | 2012-02-07 |
1.2.0.RELEASE | 2012-10-10 |
1.1.0.RELEASE | 2012-05-16 |
1.0.0.RELEASE | 2011-07-21 |
Installation or Setup
To start using Spring data JPA, you must include the dependency in your project with the one of Spring core, all together. If you’re using Maven as dependency management system (replace version-number for the version you want to use):
<dependencies>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-jpa</artifactId>
<version>version-number</version>
</dependency>
</dependencies>
And if you’re using Gradle:
dependencies {
compile 'org.springframework.data:spring-data-jpa:version-number'
}
You can also set it up when using Spring Boot, just include the starter dependency and get rid of the version number:
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
</dependencies>
search by Entity property and search by Entity property in
WarehosueEntity findWarehouseById(@Param("id") Long id);
List<WarehouseEntity> findWarehouseByIdIn(@Param("idList") List<Long> warehouseIdList);