SpringSecurity的使用

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_40406929/article/details/84929524

SpringSecurity的使用

第一步:添加依赖

第二步:在web.xml中添加过滤器和监听器

第三步:添加spring-security.xml

第四步:注意配置文件中需要放行的资源和自定义认证类

第五步:修改登录页面的表单

Form表单的提交方式一定是post  action请求一定是/login

Form表单中输入用户名和密码的input的name一定是 username和password

猜你喜欢

转载自blog.csdn.net/qq_40406929/article/details/84929524