0

I am trying to figure out how configure method works in Spring security. And found out that I can call antMatches() method right on http object without authorizeRequests() like this.

   @Override
        protected void configure(HttpSecurity http) throws Exception {
            http.antMatcher()
               
    // some code
    }

As far as I understand authorizeRequests() tells spring that next lines will be restriction of users bases on roles/authorities.

What is the point of calling antMatcher right on http?

  • 1
    does this help:[http.antMatcher()](https://stackoverflow.com/questions/59484889/what-is-the-need-for-antmatcher-in-http-antmatcher-authorizereque)? – Dirk Deyne Aug 19 '21 at 10:45
  • Does this answer your question? [What is the need for antMatcher("/\*\*") in http.antMatcher("/\*\*") .authorizeRequests().antMatchers("/")?](https://stackoverflow.com/questions/59484889/what-is-the-need-for-antmatcher-in-http-antmatcher-authorizereque) – Benjamin M Aug 20 '21 at 13:30

0 Answers0