Custom Login Page
Learn how to create custom login and logout pages.
Page creation steps
The following steps are needed to do this:
-
Design a login page and write a Thymeleaf template to match that design. The page will need a
<form>
to submit the username and password with two inputs that use username and password as names for the inputs. -
Create a controller that will return the template at
/login
. -
Update
WebSecurityConfiguration
to use the custom login page.
Let’s start with the login.html
template:
Get hands-on with 1200+ tech skills courses.