Когда я хочу начать вход в систему, я всегда получаю неправильный пароль и не получаю ошибку в терминале, проблема в том, что я не могу использовать весеннюю загрузку, и я полностью уверен что я ввожу пользователя, которого я зарегистрировал, когда я использовал более свежие весенние версии, у меня не было никаких проблем, это моя конфигурация, надеюсь, вы мне поможете.
Мне кажется, что ошибка может быть в Настройки безопасности Spring в xml, правда в том, что я никогда не настраивал защиту от xml, что я могу сказать по этому поводу?
rest-servlet. xml
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd">
<context:annotation-config />
<context:component-scan
base-package="mx.com.demo.ccas.controllers" />
<mvc:annotation-driven />
<bean id="multipartResolver"
class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
</bean>
<bean id="jspViewResolver"
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="viewClass"
value="org.springframework.web.servlet.view.JstlView" />
<property name="prefix" value="/pages/" />
<property name="suffix" value=".jsp" />
</bean>
</beans>
контекст приложения. xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:jee="http://www.springframework.org/schema/jee"
xmlns:lang="http://www.springframework.org/schema/lang"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee.xsd
http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">
<context:annotation-config />
<context:component-scan
base-package="mx.com.demo.ccas.controllers" />
<bean id="propertyConfigurer"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"
p:location="/WEB-INF/jdbc.properties" />
<bean id="dataSourceOracleL"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="${jdbc.driverClassName5}" />
<property name="url" value="${jdbc.databaseur5}" />
<property name="username" value="${jdbc.username5}" />
<property name="password" value="${jdbc.password5}" />
</bean>
<bean id="jdbcDataSourceOracleL"
class="org.springframework.jdbc.core.JdbcTemplate">
<property name="dataSource" ref="dataSourceOracleL" />
</bean>
<bean id="myUserDetailsService"
class="mx.com.demo.ccas.service.impl.LoginPropertiesService"> </bean>
<bean id="LDAPAutentificacionService"
class="mx.com.demo.ccas.service.LDAPAutentificacionService">
</bean>
<bean id="formularioService"
class="mx.com.demo.ccas.service.impl.FormularioServiceImpl">
</bean>
<bean id="customAuthenticationFailureHandler"
class="mx.com.demo.ccas.service.impl.CustomAuthenticationFailureHandler">
</bean>
<tx:annotation-driven />
</beans>
jdb c .properties
jdbc.driverClassName5=oracle.jdbc.driver.OracleDriver
jdbc.databaseur5=jdbc:oracle:thin:@localhost:1521/orcl
jdbc.username5=system
jdbc.password5=Admin123
Spring-Security. xml
<beans:beans xmlns="http://www.springframework.org/schema/security"
xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/security
http://www.springframework.org/schema/security/spring-security-3.2.xsd">
<http auto-config="true" use-expressions="true">
<intercept-url pattern="/pages/login.jsp" access="permitAll" />
<intercept-url pattern="/pages/start.jsp" access="isAuthenticated()" />
<intercept-url pattern="/rest/formulario/getPoints/" access="hasRole('ROLE_ADMIN')" />
<!-- Gestión de login -->
<!-- authentication-failure-url="/rest/autenticacion/Error2/" -->
<form-login
login-page="/pages/login.jsp"
default-target-url="/pages/start.jsp"
authentication-failure-url="/pages/login.jsp?error=2"
username-parameter="username" password-parameter="password"
always-use-default-target="true"
/>
<session-management
invalid-session-url="/pages/login.jsp?invalid">
<concurrency-control
expired-url="/pages/login.jsp?expired" max-sessions="1" />
<!-- <concurrency-control error-if-maximum-exceeded="true" expired-url="/pages/login.jsp"/> -->
</session-management>
<access-denied-handler
error-page="/pages/403.jsp" />
<logout logout-success-url="/pages/login.jsp?logout"
delete-cookies="JSESSIONID" />
<csrf/>
</http>
<!-- Select users and user_roles from database -->
<authentication-manager>
<authentication-provider>
<jdbc-user-service data-source-ref="dataSourceOracleL"
users-by-username-query= "select username,password,enabled from users where username=?"
authorities-by-username-query= "select username, role from user_roles where username=?"
/>
</authentication-provider>
</authentication-manager >
</beans:beans>
логин. jsp
<!DOCTYPE HTML><%@page language="java"
contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@page session="true"%>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<%
String errorValidacion = "";
String src = "";
String showHide = "hidden";
%>
<script type="text/javascript">
localStorage.clear();
</script>
<title>JCDecaux</title>
<link rel="shorcut icon" href="../imagenes/icono-mex.ico">
</head>
<body onload="document.getElementById('username').focus();">
<div class="limiter">
<div class="container-login100 bg-login">
<div class="wrap-login100">
<%
if ("0".equals(request.getParameter("error"))) {
errorValidacion = "LDAP connection error.";
showHide = "visible";
}
if ("2".equals(request.getParameter("error"))) {
errorValidacion = "Incorrect password.";
showHide = "visible";
}
if ("3".equals(request.getParameter("error"))) {
errorValidacion = "Wrong user.";
showHide = "visible";
}
%>
<form class="login100-form validate-form" role="form" id="loginForm"
action="<c:url value='/j_spring_security_check' />"
name="loginForm" method="POST">
<div id="carouselExampleSlidesOnly" class="carousel slide"
style="height: 100px;" data-ride="carousel">
<div class="carousel-inner">
<div class="carousel-item active">
<img src="../imagenes/logo-DIF.png"
class="img-fluid w-100 rounded-left" style="height: 70px;">
</div>
<div class="carousel-item">
<img src="../imagenes/logo-DIF-azul.png"
class="img-fluid w-100 rounded-left" style="height: 70px;">
</div>
</div>
</div>
<span class="login100-form-title p-b-26"> Mi LOGIN </span>
<div class="wrap-input100 validate-input"
data-validate="Ingrese su usuario">
<input class="input100 loginColor" type="text" id="username" name="username">
<span class="focus-input100 loginColor" data-placeholder="Usuario"></span>
</div>
<!--
<div class="row">
<div class="col-12"> <input type="text" class="form-control"></div>
</div>
-->
<div class="wrap-input100 validate-input"
data-validate="Ingrese su contraseña">
<span class="btn-show-pass"> <i class="zmdi zmdi-eye"></i>
</span> <input class="input100 loginColor" type="password" id="password"
name="password"> <span class="focus-input100"
data-placeholder="Contraseña"></span>
</div>
<div class="container-login100-form-btn">
<div class="wrap-login100-form-btn">
<div class="login100-form-bgbtn"></div>
<button class="login100-form-btn btn btn-block btn-outline-primary" id="validar" type="submit">Start
sesion</button>
</div>
</div>
<input type="hidden" name="${_csrf.parameterName}"
value="${_csrf.token}" />
<hr>
<div style="visibility:<%=showHide%>">
<%=errorValidacion%>
</div>
<hr>
</form>
</div>
</div>
</div>
</body>
</html>