Linked Questions
22 questions linked to/from Spring Boot Adding Http Request Interceptors
13 votes
2 answers
18k views
Register Spring HandlerInterceptor Without WebMvcConfigurationSupport
I'm trying to register an instance of HandlerInterceptor in Spring using Java Config without extending WebMvcConfigurationSupport. I'm creating a library with an annotation that, when added to a @...
25 votes
4 answers
3k views
Spring Boot with Two MVC Configurations
I have a Spring Boot app with a REST API, using Jackson for the JSON view configuration. It works great and I can get all the Spring Boot goodness. However, I need to add an additional REST API that ...
3 votes
2 answers
7k views
How to rewrite URLs with Spring (Boot) via REST Controllers?
Let's say I have the following controller with its parent class: @RestController public class BusinessController extends RootController { @GetMapping(value = "users", produces = {"...
2 votes
3 answers
4k views
Accept Strings and XML data with RestController
I want to create REST Server which accepts XML requests and plain text into different controllers. I tried to implement this: @SpringBootApplication public class Application extends ...
4 votes
2 answers
11k views
spring-boot interceptor is not intercepting
I have written an interceptor for my spring-boot app. But when I hit the endpoint, its executing fine.The interceptor is not able to intercept my request. Where I am going wrong or missing something? ...
3 votes
2 answers
4k views
How to process custom annotation in Spring Boot with Kotlin?
CONTEXT: I would like to create a custom annotation in Spring Boot and add extra logic for processing. I give an example with rather simplistic annotation but I want to have several of such ...
1 vote
1 answer
7k views
Intercept calls to RestController in Spring Boot
I've looked at similar problems: how to intercept all requests in spring REST controllers? spring boot adding http request interceptors And still can't figure out the solution. I have a Spring Boot ...
9 votes
3 answers
2k views
SAML Http Request Intercept with Spring Boot
In reference to this SO question Add request parameter to SAML request using Spring Security SAML I am wanting to replace the default HTTPRedirectDeflateBinding bean with my own that has a custom ...
2 votes
1 answer
5k views
How can we postHandle an exception in HandlerInterceptorAdapter?
I am currently trying to implement a customized error handler for spring boot and I have done it with the following: public class ExceptionHandler extends HandlerInterceptorAdapter { public static ...
1 vote
1 answer
5k views
How to make WebFilter work in a non-WebFlux/non-reactive Spring Boot application?
I'm trying to solve this: How to rewrite URLs with Spring (Boot) via REST Controllers? by creating some kind of "filter" which would be applied to every incoming HTTP request. The matter is ...
1 vote
3 answers
2k views
How do I register a HandlerInterceptor with constructor dependencies in Spring Boot
My use case is running custom code before a controller method by annotating methods. HandlerInterceptor seems the way to go but it seems impossible to inject dependencies into it because it needs to ...
4 votes
2 answers
3k views
How to disable interceptor call for Actuators in Springboot application
I am trying to implement Prometheus in my microservices based spring boot application, deployed over weblogic server. As part of POC,I have included the configs as part of one war. To enable it, i ...
3 votes
2 answers
2k views
Serve static content in Spring Boot despite using @RequestMapping("**")
The context I am currently working on an educational project. This implies two Spring Boot REST servers. One is an actual server, which does some processing. The one I'm interested in is the other. ...
1 vote
1 answer
1k views
Interceptor not able to receive requests in spring boot version 1.5.8
I have an application which uses quite an old version of spring boot. I have applied interceptor in the application but request is not coming to the interceptor. @Configuration public class ...
0 votes
2 answers
1k views
Spring boot application. the starter class can not find .xml file
This is my starter application class @SpringBootApplication(exclude = { DataSourceAutoConfiguration.class, HibernateJpaAutoConfiguration.class }) @ImportResource("classpath : web.xml") public class ...