I'm using Katharsis in my spring boot application in order to support json-api.
I setup Katharsis using Resources as described here: https://www.baeldung.com/json-api-java-spring-web-app
Now, I want to add another custom filter to my spring boot app. I tried adding this filter:
@Component
public class SchemaFilter implements Filter {
@Override
public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
HttpServletRequest request = (HttpServletRequest) servletRequest;
String application = request.getHeader("application");
System.out.println(application);
}
}
But it is not working.
Any ideas?
I forgot to add
@Order
annotation to my filter: