前面通过入门案例介绍,我们发现在SpringSecurity中如果我们没有使用自定义的登录界面,那么SpringSecurity会给我们提供一个系统登录界面 。但真实项目中我们一般都会使用自定义的登录界面,本文我们就来介绍下如何实现该操作 。
注意:本文是在入门案例代码的基础上演示的!
一、页面准备我们准备如下相关的jsp页面
1.login.jsp页面<%--Created by IntelliJ IDEA.User: dengpDate: 2019/12/1Time: 20:40To change this template use File | Settings | File Templates.--%><%@ page contentType="text/html;charset=UTF-8" language="JAVA" %><html><head><title>Title</title></head><body><h1>登录管理</h1><form>账号:<input type="text" name="username"><br>密码:<input type="password" name="password"><br><input type="submit" value=https://www.isolves.com/it/cxkf/kj/2021-12-06/"登录">