Reputation: 113
I am new with spring mvc (version 3.2.2.RELEASE), trying to build a project sample. I had a controller, working, reading data and parsing a json.
So I started to try to access and create data, and found about CrudRepository in a tutorial (https://spring.io/guides/gs/accessing-data-jpa/) that uses "spring-boot-starter-data-jpa"
My question is, how do I know which package contains CrudRepository and the version that I should use with my spring version? As far as I know "spring-boot-starter-data-jpa" is a group of jar, and I have a project that have spring already, so I would need just the CrudRepository artifact
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-commons</artifactId>
<version>1.9.2.RELEASE</version>
</dependency>
Upvotes: 0
Views: 391
Reputation: 2067
CrudRepository is part of Spring Data module.
So this dependency:
spring-data-commons
Here is a useful site to find the containing jar of almost any java class: GREPCODE.com:
Upvotes: 1