Questions tagged [spring-rest]

Use this tag for question about the REST architectural style used in Spring framework

REST architectural style used in Spring framework

1305 questions
0
votes
2 answers

How to shorten REST JSON with foreign keys

I have a User object, and Role object. Each user has one role. In database, the role is foreign key to table roles, where each role has just numerical id as primary key, and some textual name of the role ("admin", "user"). Now, I want to be able to…
Pitel
  • 5,334
  • 7
  • 45
  • 72
0
votes
1 answer

Spring RestTemplate Handling Multiple Responses

I'm consuming a restful service, What I observed is based on the request I see multiple responses for the same end point. For Ex : I request a GET call with the some parameters for a PDF document. if the response is good and the content type is…
Sudheer
  • 151
  • 1
  • 2
  • 10
0
votes
1 answer

AngularJS and Spring Rest

I'm using AngularJS to post a simple form to an API written with Spring boot and Rest. Every class is annotated with @RestController My spring Controller method is as following: @RequestMapping(method = RequestMethod.POST) public…
0
votes
1 answer

Infinite recursion on nested objects Spring REST

I'd like to know how to handle serialization with Spring REST with bidirectional relationships. I'm currently using Spring Boot the 1.3.0.BUILD-SNAPSHOT Currently I'm receiving and internal Server Error stating an infinite recursion on a GET request…
Baiteman
  • 535
  • 1
  • 4
  • 14
0
votes
1 answer

Bad deserialize with jackson

I try to call an url who accept to list. Data sent is {"contactAvailableIdList":["1"],"contactIdList":["2","3"]} Method on the server @RequestMapping(value = "/lodgers/{lodgerId}/associate/dissociate/contact", method = RequestMethod.PUT) public…
robert trudel
  • 5,283
  • 17
  • 72
  • 124
0
votes
0 answers

Client to server date not correct

I use spring rest and jackson 2.6.1 I have a url like So from the client this url (with startDate=13/10/2015) /rest/appointments? @RequestMapping(value = "/appointments", method = RequestMethod.GET) public List
robert trudel
  • 5,283
  • 17
  • 72
  • 124
0
votes
2 answers

SPRING - REST Template - Upload File using File Input Stream & Other primitve data

I know this has been discussed many times and I have searched a lot on Google / Stackoverflow, but can't seem to get it working. I have a Spring MVC web application, JSP sends media file along with some text fields, the controller captures the Input…
kaps
  • 81
  • 2
  • 9
0
votes
1 answer

Unauthorized access with spring security

I try to add security to a rest application. I followed this tutorial: http://www.codesandnotes.be/2014/10/31/restful-authentication-using-spring-security-on-spring-boot-and-jquery-as-a-web-client/ I configured my class who extends…
0
votes
1 answer

How do I Implement a application/vnd.api+json media type in Spring-Rest?

I've seen other cases where people try and modify the HAL formatted code to fit the JSON API media type. I don't think this is the right approach. I want to accept a new header type. What are the right classes in Spring to do this with? Will I have…
Peter S
  • 351
  • 1
  • 3
  • 13
0
votes
1 answer

Spring boot REST application not working without Build Path in Eclipse

I'm facing an issue where our spring boot application will only run if a subproject is included. A rough project sketch: Backend This is where the Main Class is located. This project also contains the spring repository which are exposed via REST,…
Baiteman
  • 535
  • 1
  • 4
  • 14
0
votes
2 answers

Similar fields in DTO

I want to create a DTO. The DTO will be used to map HTTP request to a REST webservice in spring. My controller looks like this: RequestMapping( value = DmsRestSvcApi.DOCUMENT_SEARCH_PATH, method = RequestMethod.POST, produces = {…
0
votes
1 answer

Spring Data Jpa, REST, org.springframework.beans .TypeMismatchException from Angularjs front end

I have request from my Angularjs factory is as follows: .factory('TrackingNumberDetailsUpsGeneralService', function ($http) { return { findByInvoiceDetailsId: function (invoiceDetails) { …
smart987
  • 834
  • 2
  • 14
  • 34
0
votes
2 answers

Spring 4.2.1 RestController tried to return template instead return JSON

I tried to create a Spring Rest Controller, based on this example i create a controller like this. DeveloperRestController.java @RestController public class DeveloperRestController { @RequestMapping("/developer/list") public Developer…
zho
  • 643
  • 1
  • 12
  • 27
0
votes
1 answer

why one security filter blocking to execute to another in Spring MVC-security app?

I am new to the Spring Security module. I would like to know what is the difference between two security filters?
user5268786
0
votes
1 answer

Setting the Database in MongdoDB-data-REST-complete

I am using the Spring Guide for the MongoDB-data-rest-complete example and I want it to use a specific mongodb database, rather than the default one ('test'). How do I do this?
Peter S
  • 351
  • 1
  • 3
  • 13