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
0 answers
Spring Data Rest incompatible with Spring Data Neo4J?
I'm trying to incorporate Spring Data Rest into an application that is using Spring Data Neo4J. I get the following exception on start when I include Spring Data Rest into my application:
18:41:10.632 [main] INFO o.h.tool.hbm2ddl.SchemaUpdate…

John
- 10,837
- 17
- 78
- 141
1
vote
1 answer
Spring Data REST search methods return empty body when not results found
When performing a search using one of the /{repository}/search/{method} search methods, if the search parameters result in an empty result, the response is an empty body. This can cause problems with an Ajax application that always expects a value…

Marc Zampetti
- 733
- 7
- 20
1
vote
0 answers
Spring Data REST Controllers vs Custom Controllers
I have a 2 domain classes one with reference to another like this:
@Document
public class Dummy {
@Id
private UUID id;
private String name;
@Reference
private DummyAttribute dummyAttribute;
// getters and setters…

ajj
- 101
- 1
- 10
1
vote
1 answer
Spring Data Neo4j polymorphic association appears embedded
I'm having a problem exposing a relationship to a sub-type via rest.
I have an abstract class called Page:
@NodeEntity
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "category", visible =…

aycanadal
- 1,106
- 2
- 15
- 42
1
vote
1 answer
spring data rest last modified header not getting populated
Hi I have configured my app as per https://github.com/spring-projects/spring-data-examples/tree/master/rest/headers but when I check the responses to my entities the last modified header is not coming even though I have setup everything correctly…

Gaurav Rawat
- 1,294
- 1
- 25
- 52
1
vote
0 answers
Empty references and collections in Projections processing issue
there is a problem during creation of Projection class for one of my entities. the issue raises when one of the object's embedded elements is empty.
the projection class source is:
@Projection(name = "summary", types = {Question.class})
public…

XaHDpE
- 53
- 1
- 6
1
vote
1 answer
how to introduce etag and version headers with spring data rest abstraction
Hi I am using spring data rest with Jpa in my project to expose HAL based rest webservices .It works well for most of my cases and for further customization I do use additional controllers and call spring data repositories to fetch data for me and…

Gaurav Rawat
- 1,294
- 1
- 25
- 52
1
vote
3 answers
Spring Data Rest: Return Resources of User
I'm creating a simple CRUD-App (a shoppinglist) with Spring Boot and Spring Data Rest. I have a resource: ShoppingItem. Is there an easy way to only return the resources which belong to the user who send the request? (Multiple User support) So a…

Yannic Bürgmann
- 6,301
- 5
- 43
- 77
1
vote
1 answer
Spring data Rest Partitioning Data
I was wondering, if one were to use Spring Security with Spring data rest, would it be possible to partition the data so that the user of the REST API can only say data related to them?
More specifically, assuming Spring data ne04j exposed over…

Marc Byfield
- 510
- 4
- 14
1
vote
1 answer
Run another project's web service before start tests
IntelliJ project has two modules: Spring Data Rest app and client. Both apps are Spring bootable apps. I made a lot of tests at client and now before every test iteration I have to run the rest service manually.
Test class looks like…

nKognito
- 6,297
- 17
- 77
- 138
1
vote
1 answer
Spring Data Rest override controller for Templated Link
I am using Spring Data REST to expose various domain objects as resources.
@Entity
class Person() {
//fields
}
public interface PersonRepository implemets PagingAndSortingRepository {
}
So now /persons will be mapped to the…

ChrisGeo
- 3,807
- 13
- 54
- 92
1
vote
1 answer
Return custom-typed object from JpaRepository
I have the following repository:
public interface UserRepository extends BaseDAO {
Collection findByEmail(@Param("email") String email);
@Query("select new com.data.CustomUser(upper(substring(u.lastName, 1, 1)) as initial,…

nKognito
- 6,297
- 17
- 77
- 138
1
vote
1 answer
Spring Data Rest / HATEOAS First and Last Rels
Is there away to enable First and Last paging links in Hal format? Besides creating a Custom PagedResourcesAssembler that is?
Seems it like something rather common that could be enabled with a simple setting.

ChrisGeo
- 3,807
- 13
- 54
- 92
1
vote
1 answer
Relate to an arbitrary Map.Entry in Neo4j using Spring Data Neo4j
I'm trying to store properties as nodes in my Neo4j graph, which then can be reached using the Spring Data Rest API. (And then later I'd like to find object with same properties in my graph.)
The JSON representation of my object should be like
{
…

endrec
- 447
- 6
- 17
1
vote
0 answers
spring data CustomBackendIdConverter: implement fromRequestId method
I have the same problem like it discussed in the implementation of toRequestId() in the CustomBackendIdConverter class
The method works. But how can I implement fromRequestId() (another direction)? I get the error:
"No converter found capable of…

user1648825
- 979
- 11
- 19