spring-security.xml
login.jsp登录页面
第一点:login.jsp登录页面中的请求地址要与spring-security.xml中的地址一致
spring-security.xml中的登录权限名
配置具体的拦截的规则 pattern="请求路径的规则" access="访问系统的人,必须有ROLE_USER的角色"
spring-security.xml中的数据库配置,userService为调用的bean名称
bean为userService,管理登录权限
@Service("userService")与spring-security.xml中的user-service-ref="userService"名字一致
在bean为userService中,登录权限名必须与配置文件中的一致
在配置文件中配置了对密码的加密方式:
<security:password-encoder ref="passwordEncoder"/>
从而导致每次登陆输入的密码是正确的,但是它对数据库中的密码进行了加密,也无法使之匹配。
可以先去掉加密