Correct use of WebSecurity in WebSecurityConfigurerAdapter

前端 未结 2 538
离开以前
离开以前 2021-01-31 11:09

In my Spring Boot application based on version 1.3.0.BUILD-SNAPSHOT, I have the static resources (images, css, js) in the static folder un

2条回答
  •  不要未来只要你来
    2021-01-31 11:49

    Well in the code you shared, if you had your static files i.e. CSS/JS etc in a folder called static then all your static resources will be added to the page whereas if you left out

    web.ignoring()
        .antMatchers("/static/**");
    

    none of your static resources will be loaded.

    Spring Security is extremely powerful, Spring has great documentation so you should just go read about it fully appreciate/understand it.

    Here is a link

提交回复
热议问题