Top "Spring-restcontroller" questions

@RestController is Spring MVC's shortcut annotation for creating Rest Controllers.

@RestControllerAdvice and @ControllerAdvice together

I have an Spring MVC application which has @Controller s and @RestController s. I was thinking that: When I have …

spring exception-handling controller spring-restcontroller
RestTemplate can't fetch JSONObject

I can't fetch JSONObject directly, this code works: RestTemplate restTemplate = new RestTemplate(); String str = restTemplate.getForObject("http://127.0.0.1:8888/books", String.class); …

spring resttemplate spring-restcontroller spring-rest
Does Spring create new thread per request in rest controllers?

I wanted to learn non blocking REST, but first I wrote blocking controller for comparison. To my surprise Spring doesn't …

spring spring-mvc spring-restcontroller spring-rest
Spring MVC RestController scope

I have the following Spring controller: package hello; import java.util.concurrent.atomic.AtomicLong; import org.springframework.web.bind.annotation.…

java spring spring-mvc spring-restcontroller
GetMapping to produce CSV file using Spring Boot

I'm writing a spring rest method to get details from database and set it in a response POJO and then …

java spring csv spring-boot spring-restcontroller
How to validate file type, size while uploading in Rest in Spring?

I am trying to implement file uploading using spring and Rest. Here what I have done this far @RestController @RequestMapping("/…

java spring rest spring-mvc spring-restcontroller
Map parameter as GET param in Spring REST controller

How I can pass a Map parameter as a GET param in url to Spring REST controller ?

spring spring-mvc spring-restcontroller
@RequestBody not mapping JSON to Java Object - Spring Boot

I am unable to convert my JSON from post's method body into my POJO, with @RequestBody inside my controller class. …

java json spring-boot mapping spring-restcontroller
Using Spring @RestController to handle HTTP GET with ZonedDateTime parameters

I'm creating an endpoint that will receive dates to do some filtering in the server side. The code looks like …

java spring spring-mvc spring-restcontroller
Test spring rest controller secured with https

Can anybody provide me with a code sample to write integration test for a controller which is secured with HTTPS?? …

spring-boot spring-test spring-restcontroller spring-test-mvc