Examples of OncePerRequestFilter


Examples of org.springframework.session.web.http.OncePerRequestFilter

        servlet = new HttpServlet() {};
        request = new MockHttpServletRequest();
        response = new MockHttpServletResponse();
        chain = new MockFilterChain();
        invocations = new ArrayList<OncePerRequestFilter>();
        filter = new OncePerRequestFilter() {
            @Override
            protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException {
                invocations.add(this);
                filterChain.doFilter(request, response);
            }
View Full Code Here

Examples of org.springframework.session.web.http.OncePerRequestFilter

        assertThat(invocations).containsOnly(filter);
    }

    @Test
    public void doFilterOtherSubclassInvoked() throws ServletException, IOException {
        OncePerRequestFilter filter2 = new OncePerRequestFilter() {
            @Override
            protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException {
                invocations.add(this);
                filterChain.doFilter(request, response);
            }
View Full Code Here

Examples of org.springframework.web.filter.OncePerRequestFilter

        @Override
        protected void configure(HttpSecurity http) throws Exception {
            configureHeaders(http.headers());
            http.exceptionHandling().authenticationEntryPoint(authenticationEntryPoint())
                    .and().requestMatchers().antMatchers("/admin/**", "/signout").and()
                    .addFilterAfter(new OncePerRequestFilter() {

                        // TODO this filter needs to be removed once basic auth is removed
                        @Override
                        protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response,
                                                        FilterChain filterChain) throws ServletException, IOException {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.