Создание своей страницы логина Spring Security

Новичок в Spring Security. Не понимаю по какой причине, при нажатии логина, выбрасывается 404. Корневой URL /login, при action="login//j_spring_security_check" та же самая ошибка.

Конфигурация для Security:

protected void configure(HttpSecurity http) throws Exception {
    http.authorizeRequests()
            .antMatchers(HttpMethod.POST, "/j_spring_security_check").permitAll()
            .antMatchers("/auth").authenticated()
            .antMatchers("/locale").permitAll()
            .antMatchers("/locale/**").permitAll()
            .antMatchers("/**").authenticated()
            .and().formLogin().loginPage("/entrance")
    .loginProcessingUrl("/j_spring_security_check.action").defaultSuccessUrl("/").failureForwardUrl("/failed").permitAll();
}

JSP с входом:

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>

<form action="/j_spring_security_check" method='POST'>
<div class="container">
    <h1><fmt:message key="message.entrance" bundle="${tr}"/></h1>
    <p><fmt:message key="message.loginReadme" bundle="${tr}"/></p>
    <hr>

    <label for="username"><b><fmt:message key="message.login" bundle="${tr}"/></b></label>
    <input id="username" type="text" placeholder="<fmt:message key="message.enterLogin" bundle="${tr}"/>" name="j_username" required>

    <label for="password"><b><fmt:message key="message.password" bundle="${tr}"/></b></label>
    <input id="password" type="password" placeholder="<fmt:message key="message.enterPassword" bundle="${tr}"/>" name="j_password"
           required>

    <button type="submit" class="registerbtn"><fmt:message key="message.buttonEntrance" bundle="${tr}"/></button>
    <input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/>
</div>

<div class="container signin">
    <p><fmt:message key="message.haven'tAccount" bundle="${tr}"/><a href="register2.jsp"><fmt:message
            key="message.register" bundle="${tr}"/></a></p>
    <p><a href="${pageContext.request.contextPath}/locale/ru_RU">RU</a>
        <a href="${pageContext.request.contextPath}/locale/en_EN">EN</a></p>
</div>

Ответы (0 шт):