Top "Spring-rest" questions

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

Spring Boot - How to log all requests and responses with exceptions in single place?

I'm working on rest api with spring boot. I need to log all requests with input params (with methods, eg. …

java spring logging spring-rest
Reading HTTP headers in a Spring REST controller

I am trying to read HTTP headers in Spring based REST API. I followed this. But I am getting this …

java spring rest spring-restcontroller spring-rest
How to create a Spring Interceptor for Spring RESTful web services

I have some Spring RESTful (RestControllers) web services with no web.xml and I am using Spring boot to start …

spring-mvc spring-restcontroller spring-rest
Spring RestTemplate and generic types ParameterizedTypeReference collections like List<T>

An Abstract controller class requires List of objects from REST. While using Spring RestTemplate its not mapping it to required …

java resttemplate spring-rest spring-web
REST POST works correctly with POSTMAN but exception when using Spring RestTemplate

I am writing a Rest client to post JSON data using Spring RestTemplate. Using POSTMAN and following JSON data in …

java spring rest resttemplate spring-rest
spring jpa - At least one JPA metamodel must be present*

Anybody know why it doesn't work? Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled. 06/04/2017 14:11:24.732 …

java sql-server spring-boot spring-data-jpa spring-rest
HTTP POST using JSON in Spring Rest

I would like to make a simple HTTP POST using Spring RestTemplate. the Wesb service accept JSON in parameter for …

spring web-services rest spring-mvc spring-rest
Custom validation logic for parameter in REST endpoint Spring Boot

I currently have this RequestMapping where I use validation through a regular expression: @RequestMapping(value = "/example/{id}", method = GET) public …

java spring validation spring-boot spring-rest
Spring restTemplate get raw json string

How can I get the raw json string from spring rest template? I have tried following code but it returns …

java json spring spring-mvc spring-rest
Error: The given id must not be null for GeneratedValue in JPA

My object: @Entity @Table(name="user") public class User { @Id @Column(name="uid") @GeneratedValue(strategy=GenerationType.IDENTITY) private Long id; //…

java rest jpa spring-boot spring-rest