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
3 answers
RepositoryRestResource with spring-boot CLI
I'm trying to implement a simple REST service based on a JPA repository with spring-boot and spring-data-rest. (see this tutorial) The following code works quite well if a use it with gradle:
package ch.bfh.swos.bookapp
import…

Endian
- 13
- 1
- 4
1
vote
2 answers
update methods in spring data rest repositories
I am using Spring data rest and I want to add some additional functionality to my repository.
@RestResource(exported = true)
public class ItemRepository extends JpaRepository- {
@Query("update ...")
void modifyItem();
}
The…
user3450918
1
vote
1 answer
Spring + ExtJS File Upload Required MultipartFile parameter 'file' is not present
I am having a problem uploading files using ExtJS with Spring 4.0.5 with RepositoryRestMVC functionality.
Briefly, I have a form created by ExtJS and submits the POST request to Spring MVC backend.
I have setup Spring using java config, no xml…

OchiengOlanga
- 135
- 1
- 3
- 11
1
vote
1 answer
$addToSet implementation for array update on PATCH request
Is there a way to tell MongoRepository to implement $addToSet when updating an array value during PATCH request?
I am using Spring data rest with HATEOAS and Mongodb, and the current implementation replaces the old array with the new array, where…

user3848737
- 45
- 2
- 5
1
vote
0 answers
Spring DATA Rest - @OneToOne not saving the relationship updated entity
I have a pretty simple relationship where I have a Person entity with a @OneToOne mapping to a PersonAttributes entity.
I have a PersonRepository as such:
@Transactional(propagation = Propagation.REQUIRED)
public interface PersonRepository extends…

Cory D
- 31
- 2
1
vote
2 answers
Update a resource with associations in spring-data-rest
Let's say I have a AFolder class with name, description and a List as an attribute. Now assume that I have created a AFolder object with its list of AFile populated. If I try to update using PUT/PATCH with something like {"name": "new name",…

wakandan
- 1,099
- 4
- 19
- 27
1
vote
1 answer
Use CommonsMultipartResolver in Spring and config in test
I have an integration test that make a request (uploading a file) on my controller.
The test works without setup any CommonsMultipartResolver. But in the moment where I have to setup the production environment I have to add the…

code4fun
- 1,012
- 3
- 24
- 41
1
vote
0 answers
Pass parameter to query
I have run into a problem when passing arguments to this query. When I try to run I get an exception.
@Query("select o from Offer o, OfferCriteria ocg where o = ocg.offer and ocg.criteria = 'gender' and ocg.criteriaValue in (2, (select c.gender from…

Uros Stankovic
- 13
- 1
- 5
1
vote
1 answer
How to sort Global Secondary Index DynamoDB
Data-REST and dynamoDB and trying to sort my GSI object as follows, is it possible to sort GSI Hashkey in dynamoDB,
Domain class
@DynamoDBTable(tableName = "test")
public class Test implements Serializable{
private static final long…

jAddict
- 395
- 3
- 6
- 18
1
vote
1 answer
How to post to a URL with hash + range key Spring Data DynamoDB
As in spring-data-dynamoDB demo, I have created my application with hash and range keys, but am unable to post any data into my Table using POST because the following exception,
{cause: {cause: {cause: null,message: null}, message: "N/A (through…

jAddict
- 395
- 3
- 6
- 18
1
vote
1 answer
Spring-data-rest POST link throws Null-Pointer Exception
I have an entity called StockLevel and another one called Version and they are in a relationship like this:
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "version", nullable = false, referencedColumnName = "pk")
private VersionModel…

Petar Tahchiev
- 4,336
- 4
- 35
- 48
1
vote
2 answers
Cannot run Spring Data Rest with Google App Engine (GAE)
This is the error that I see when running Spring Data Rest app with appengine:devserver
[INFO] java.lang.ClassNotFoundException: org.springframework.data.rest.webmvc.RepositoryRestExporterServlet
[INFO] at…

quarks
- 33,478
- 73
- 290
- 513
1
vote
0 answers
Remove HATEOS from spring data rest?
Is it possible to remove HATEOS from spring data rest?
What I want to do is just retrieve plain JSON from spring since I also need to get the values from a nested class.

Luis Vargas
- 2,466
- 2
- 15
- 32
1
vote
0 answers
Spring Data Rest Configuration is not reflecting as expected
I have just started with Spring Data Rest (SDR) hence don't have much experience in this. I initially worked for Spring Data JPA and currently started with Spring Data Neo4j, where I have to implement SDR to generate application/hal+json response…

user3137239
- 149
- 2
- 4
- 9
1
vote
1 answer
Spring Data Rest: is it domain class specific?
How does Spring Data Rest work with those repository which is not particular to single Domain class ?
I mean I have following repository:
public interface MyRepository extends GraphRepository, PagingAndSortingRepository

Aman Gupta
- 5,548
- 10
- 52
- 88