在springboot整合spring security 过程中曾遇到下面问题:(spring boot 2.0以上版本   spring security 5.x    (spring  security 4.x不知道是否会存在以下问题) )

springboot配置spring security 静态资源不能访问

 

 

 springsecurity会自动屏蔽我们引用的css,js等静态资源,导致页面不能加载出该有的样式。
应在继承了WebSecurityConfigurerAdapter类中的configure方法中添加允许加载的配置

springboot配置spring security 静态资源不能访问

 

 

 

 springboot配置spring security 静态资源不能访问

 

 

 

 

相关文章: