Created
October 27, 2015 13:30
-
-
Save ekirastogi/725fd50ecd2a1e83c1f6 to your computer and use it in GitHub Desktop.
How to register a Filter in spring boot application
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.ekiras.filter; | |
import org.springframework.core.annotation.Order; | |
import org.springframework.stereotype.Component; | |
import javax.servlet.*; | |
import java.io.IOException; | |
/** | |
* Created by ekansh on 22/10/15. | |
*/ | |
@Component | |
@Order(1) | |
public class SecurityFilter implements Filter{ | |
@Override | |
public void init(FilterConfig filterConfig) throws ServletException { | |
} | |
@Override | |
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { | |
chain.doFilter(request, response); | |
} | |
@Override | |
public void destroy() { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment