Top "Spring-restcontroller" questions

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

How to return plain text in spring controller?

I want to return a simple plain text string as follows: @RestController @RequestMapping("/test") public class TestController { @ResponseStatus(HttpStatus.OK) @…

spring plaintext spring-restcontroller
Caching in Spring 5 WebFlux

Are there any way to cache a Flux coming from WebClient in Spring 5? I tried this but is not caching …

spring spring-restcontroller spring-webflux
Restful-based video streaming

Using spring boot, I want to make RESTful-based video player. I have my .mp4 extension videos in my file browser. …

spring spring-boot video-streaming html5-video spring-restcontroller
How to send Integer value in the form of JSON format and recieve in REST Controller?

I have one REST Controller where I have written this code @PostMapping(value = "/otp") public void otp(@RequestBody Integer mobile) { …

java json spring spring-boot spring-restcontroller
Difference between @RestController and @RepositoryRestController

What is the typical use case code that shows the difference between those two annotations - meaning the @RestController and …

spring-mvc spring-data spring-data-rest spring-restcontroller
InvalidDefinitionException: Cannot construct instance of `com.vehicle.datatransferobject.VehicleDTO`

In the REST endpoint I'm building in Spring Boot, I'm trying to pass my vehicleDTO to my controller. But before …

rest spring-boot jackson spring-restcontroller
How to debug 404 resource not found in spring mvc rest?

I have a sample spring rest mvc application which has the following java code: SampleController.java import org.apache.logging.…

java maven spring-restcontroller spring-rest
JSON parse error: Can not construct instance of class

Unable to map json string with java object, getting error JSON parse error: Can not construct instance of com.test.…

java json post spring-boot spring-restcontroller
Spring Boot REST path mapping

I'm just thinking, what is the best practice to create PATH mapping for rest service. Let's say we have following …

spring spring-boot spring-restcontroller spring-rest
The Spring validation @NotNull does not validate

I’m trying to validate a POST request using Spring Validator. This is the Object I’m trying to validate: @…

java spring spring-boot spring-restcontroller spring-validator