0

I have the configuration

@Override
public void configure(WebSecurity web) throws Exception {
        web
            .ignoring()
            .antMatchers("/base/**");
}

And I want to include for view from all paths just this path /base/includepath.

How I can do it?

  • 1
    you config is proper and it contains your requirement !! what is problem? – Ali Akbarpour Oct 20 '17 at 18:28
  • I want to not ignoring the path `/base/includepath`. Now this configuration ignoring all paths over `/base/`. –  Oct 21 '17 at 18:35
  • 1
    I guess this is what you are looking for - https://stackoverflow.com/questions/29328120/explicitly-secure-a-specific-pattern-instead-of-ignoring-all-non-secured-pattern – Leffchik Oct 23 '17 at 05:44

1 Answers1

0

If you want to exclude url from authentication(like /base/includepath) you just need to act like below:

@Override
public void configure(WebSecurity web) throws Exception {
    web.ignoring().antMatchers("/base/includepath");
} 

I hope this was what you are looking for.

Ali Akbarpour
  • 958
  • 2
  • 18
  • 35