Spring Data REST (SDR) is a Spring Data project that aims to make it easy to expose Spring Data repositories as REST services. SDR use Spring HATEOAS internally to create HAL response.
Questions tagged [spring-data-rest]
2228 questions
1
vote
1 answer
Getting Maven Build Error for spring-data-rest-webmvc 2.3.0.BUILD_SNAPSHOT
When I run with Version 2.3.0.BUILD-SNAPSHOT, I am getting below error since yesterday while runng mvn jetty:run. I tried deleting whole repository and clean install already. This error goes away on changing to 2.2.1.RELEASE.
Gives Error -
…

fortm
- 4,066
- 5
- 49
- 79
1
vote
1 answer
Spring Data Rest and collections with unique constraints
I'm evaluating spring-data-rest and am running into a situation where the magic no longer appears to be working in my favor.
Say I have a collection of items.
Parent - 1:M - Child
Parent
Long id
String foo
String bar
@OneToMany(...)
…

joincamp
- 383
- 3
- 10
1
vote
1 answer
Cannot load entity by root class in joined inheritance chain with JPA (Hibernate)
I have the following inheritance chain:
@MappedSuperclass
public abstract class AbstractEntity {
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE)
Long id;
}
@Entity
@Table(name = "answers")
@Inheritance(strategy =…

Thomas Eizinger
- 1,404
- 14
- 25
1
vote
1 answer
JPA2.0 property access in spring rest data -- some getters not being called
I am still somewhat of a novice with Spring Boot and Spring Data Rest and hope someone out there with experience in Accessing by Property. Since I cannot change a database which stores types for Letters in an unnormalized fashion (delimited string…

Mark Bordelon
- 113
- 1
- 1
- 9
1
vote
1 answer
Error: Cannot create self link for class
I am getting below mentioned error when trying to access records from DB using a spring-data-jpa and spring-data-rest.
Cannot create self link for class [Ljava.lang.Object;! No persistent
entity found!
I am using below query to retrieve…

chetank
- 392
- 3
- 17
1
vote
1 answer
Spring Data Neo4j: How to create working @Query
I have two @NodeEntity classes:
@NodeEntity
class User {
@GraphId
Long id;
String username;
}
@NodeEntity
class Data {
@GraphId
Long id;
String data;
@RelatedTo(direction=Direction.BOTH)
User user;
}
And one…

Danne
- 11
- 2
1
vote
2 answers
Error Contoller Howto : Spring-boot + Spring-Data-Rest
Spring Boot with Spring Data Rest - how to use a custom error handler.
Created an error controller I tried to skip the default error handler by using following code.
Why it is not…

Tech Gunu
- 11
- 2
1
vote
4 answers
Spring data rest link name
I have a class Category which has multiple bi-directional many-to-one association with other entities-
public class Category implements Serializable {
@Id
@Column(name = "CATEGORY_ID", unique = true, nullable = false)
…

Vijay Kumar Rajput
- 1,071
- 1
- 10
- 30
1
vote
0 answers
Spring data rest - custom query with Page object
When I use standard url for getting entities spring data rest adds Page object to json:
"page": {
"size": 20,
"totalElements": 144429,
"totalPages": 7222,
"number": 0
}
but when I wrote…

moss
- 81
- 1
- 4
1
vote
1 answer
Retrieving the URI and Collection Rel of an entity in Spring Data Rest
As the title says. For context, although not terrible important, I'd like to trigger a WebSocket notification in the AfterSave event listener, and I'd like the resource or collection URI to correspond to the subscription endpoint. Of course, I…

bvulaj
- 5,023
- 5
- 31
- 45
1
vote
0 answers
How to return a single item from a query with spring data REST
How can we make spring-data-rest return a single resource for a query, instead of an embedded list? This would make navigation much more intuitive for the client.
e.g.
t.follow("search", "byNameAndType", "identity", "mainContact")
instead…

dan carter
- 4,158
- 1
- 33
- 34
1
vote
0 answers
How to format the spring rest data json output
I'm using Spring Data Rest for reading the records from amazon dynamodb. The service works fine except for output format.
The output I see from the service is -
---> HTTP GET
---> END HTTP (no body)
<--- HTTP 200 (1082ms)
: HTTP/1.1 200…

user1128891
- 23
- 3
1
vote
0 answers
Custom controller method for POST hides rest repository endpoints for GET
I have a spring-data-rest repository that exposes rest endpoints for /students and /schools (the /schools repo is read only, but the /students is read/write).
I created my own custom controller with only a save method with @RequestMapping(value =…

gyoder
- 4,530
- 5
- 29
- 37
1
vote
1 answer
override maven dependency with local library
In my pom.xml I want to include
org.springframework.data
spring-data-rest-webmvc
2.2.1.RELEASE
Unfortunately this library is not being pulled…

dexBerlin
- 437
- 3
- 9
- 22
1
vote
1 answer
Per query JSON serializer in Spring Data Rest
Is there any way to define a JSON serializer per query? I would like to be able to define different JSON output for some queries, something similar to this:
@RepositoryRestResource(collectionResourceRel = "people", path = "person")
public interface…

Jean Duarte
- 170
- 5