public void configure(WebSecurity web) { WebSecurity and = web.ignoring() .and();
@Override public void configure(WebSecurity web) throws Exception { // AuthenticationTokenFilter will ignore the below paths web.ignoring() .antMatchers( HttpMethod.POST, authenticationPath ) // allow anonymous resource requests .and() .ignoring() .antMatchers( HttpMethod.GET, "/", "/*.html", "/favicon.ico", "/**/*.html", "/**/*.css", "/**/*.js" ) .and() .ignoring() .antMatchers("/h2-console/**/**"); } }
@Override public void configure(WebSecurity web) throws Exception { // AuthenticationTokenFilter will ignore the below paths web.ignoring() .antMatchers( HttpMethod.POST, authenticationPath ) // allow anonymous resource requests .and() .ignoring() .antMatchers( HttpMethod.GET, "/*.html", "/**/*.html", "/**/*.css", "/**/*.js" ); } }
@Override public void configure(WebSecurity web) throws Exception { // Allow swagger to be accessed without authentication web.ignoring().antMatchers("/v2/api-docs")// .antMatchers("/swagger-resources/**")// .antMatchers("/swagger-ui.html")// .antMatchers("/configuration/**")// .antMatchers("/webjars/**")// .antMatchers("/public") // Un-secure H2 Database (for testing purposes, H2 console shouldn't be unprotected in production) .and() .ignoring() .antMatchers("/h2-console/**/**");; }
@Override public void configure(WebSecurity web) throws Exception { // AuthenticationTokenFilter will ignore the below paths web .ignoring() .antMatchers( HttpMethod.POST, authenticationPath ) // allow anonymous resource requests .and() .ignoring() .antMatchers( HttpMethod.GET, "/", "/*.html", "/favicon.ico", "/**/*.html", "/**/*.css", "/**/*.js" ) // Un-secure H2 Database (for testing purposes, H2 console shouldn't be unprotected in production) .and() .ignoring() .antMatchers("/h2-console/**/**"); } }