Questions tagged [spring-data-rest]

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.

2228 questions
1
vote
0 answers

How to create a new n:n relationship row by Spring Data Rest's POST

I have an n:n relationship in DB: Here is the entity for question: package data.entity; import javax.persistence.*; import java.io.Serializable; import java.util.HashSet; import java.util.Set; @Entity @Table(name = "question") public class…
José Vte. Calderón
  • 1,348
  • 12
  • 17
1
vote
1 answer

adding spring-data-rest ontop of spring-data-jpa

i created a maven project, and added all dependencies i need. i have some repositories using the spring-data-jpa, and i added some integration tests. now i need to add ontop of it spring-data-rest, if i understand it is based on springmvc. but all…
1
vote
2 answers

Spring-data-rest testing in POSTMAN

I am developing a application in Spring-data-rest. I am testing the POST requests from POSTMAN client to test whether the data is inserting into DB.In my DB i have a cartItems table. I am able to POST the data while i POST the JSON as Follows: …
MAK
  • 390
  • 2
  • 8
  • 25
1
vote
1 answer

Request method 'PUT' not supported

I'm working with springboot angularsjs and restful. my rest controller @RequestMapping(value="/updatestructure/{ch}",method = RequestMethod.PUT) public @ResponseBody Structurenotification updateStructure(@PathVariable(value="ch")…
1
vote
1 answer

Request method 'DELETE' not supported angularsjs springboot

hello i'm using spring boot , restful web service and angularjs, this is my restControlleur @RestController @RequestMapping("/structure") public class StructureNotificationRestContolleur { @Autowired StructureNotificationService StructureNotif; …
1
vote
1 answer

Expose @Service methods as Rest endpoints using spring-data-rest

I using spring-data-rest in conjunction to spring-data-jpa which exposes all my spring-data-jpa interfaces as REST resources in HAL JSON format. I would like to expose my @Service methods in the same fashion. Is this possible? If not, what is the…
jax
  • 37,735
  • 57
  • 182
  • 278
1
vote
0 answers

Database collation w.r.t Spring DATA REST project

I have an application being built on Spring DATA and Spring DATA REST platform (Using Spring Boot). Hibernate is the JPA provider and SQL Server 2008 database. Further, we have alphanumberic ID columns and so, with case insensitive DB collation, the…
rakpan
  • 2,773
  • 4
  • 26
  • 36
1
vote
1 answer

SpEL on Hibernate Entity

I have a situation where I have a @ManyToOne relationship as below, public class PersonEntity implements Serializable { @Id @Column(...) private String personID; @Basic @Column(...) private String parentID; @ManyToOne(fetch =…
rakpan
  • 2,773
  • 4
  • 26
  • 36
1
vote
1 answer

Spring Boot with session-based data source

I've been tearing my hair out with what should be a pretty common use case for a web application. I have a Spring-Boot application which uses REST Repositories, JPA, etc. The problem is that I have two data sources: Embedded H2 data source…
robross0606
  • 544
  • 1
  • 9
  • 19
1
vote
0 answers

spring data REST webmvc HATEOAS - How to identify target type in a link property?

I am working on a CRUD application using spring-data-rest-webmvc. I have a Product entity as below:- { "version": 0, "displayName": "Test Product", "_links": { "self": { "href": "http://localhost/services/data/products/123465" }, …
Lijo Jacob
  • 1,241
  • 1
  • 10
  • 9
1
vote
1 answer

Enabling mongo exception translation in spring-data-rest

Following this tutorial, working with complete code, how do I enable exception translation for mongo? When my mongo db is down, i'm getting 500 error from com.mongodb.MongoServerSelectionException. Shouldn't this be translated into…
airborn
  • 2,547
  • 1
  • 15
  • 12
1
vote
1 answer

Integrate Extjs with HAL

How i could bind Spring DATA REST which outputs HAL, with ExtJS (v4.1) client, ExtJS do not have support for HAL, but how i could integrate libraries like Hyperagent.js or any JS library supporting HAL, with Extjs data model, to link Stores with the…
geogeek
  • 1,274
  • 3
  • 25
  • 42
1
vote
1 answer

Spring Data Rest - Multiple endpoints

I’m working on a Spring Data Rest project and would like a way to effectively ‘split’ my API off two base roots / endpoints. For example, consider the root below: { "_links": { "orders": { "href":…
fb08
  • 11
  • 1
1
vote
2 answers

How can I change neo4j Id to UUID and get finder methods to work?

Neo4j needs an id field to work which is of type Long. This works well with Spring data neo4j. I would like to have another field of type UUID and have T findOne(T id) to work with my UUID not neo generated Ids. As I am using Spring Data Rest, I…
Chirdeep Tomar
  • 4,281
  • 8
  • 37
  • 66
1
vote
1 answer

Spring Data REST UPSERT Statement

I have a Spring REST exported URL where I want to do UPSERT operation. If the row exists it will UPDATE , else it will INSERT. I have earlier been doing POST for CREATE, PATCH for UPDATE and DELETE for Delete. Is there any way I can have UPSERT…
fortm
  • 4,066
  • 5
  • 49
  • 79