最近,我已经从4.0.5.RELEASE升级到了Spring 5.3.20,我也改变了其他的依赖版本。它正在成功地构建,但是当我试图运行时,它在码头后给出了错误。
Pom. xml中的升级版本:
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java-version>1.8</java-version>
<org.springframework-version>5.3.20</org.springframework-version>
<org.springframework-security-version>5.6.3</org.springframework-security-version>
<org.apache.tiles-version>3.0.4</org.apache.tiles-version>
<!-- <org.hibernate-version>5.6.10.Final</org.hibernate-version> --> <!-- 4.3.5.Final -->
<org.hibernate-version>5.3.7.Final</org.hibernate-version><!-- 5.1.17.Final -->
<org.aspectj-version>1.6.10</org.aspectj-version>
<org.slf4j-version>1.7.7</org.slf4j-version>
<jackson.version>2.11.3</jackson.version> <!-- 2.11.3 -->
<!-- <jackson.version>2.14.1</jackson.version> -->
</properties>
构建是成功的(使用maven),但当我尝试运行代码时,我在jetty之后得到这个错误,
错误-
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.filterChains': Cannot resolve reference to bean 'org.springframework.security.web.DefaultSecurityFilterChain#31' while setting bean property 'sourceList' with key [31];
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.web.DefaultSecurityFilterChain#31': Cannot resolve reference to bean 'concurrencyFilter' while setting constructor argument with key [2];
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'concurrencyFilter' defined in ServletContext resource [/WEB-INF/spring/security.xml]: Instantiation of bean failed;
nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.web.session.ConcurrentSessionFilter]: No default constructor found;
nested exception is java.lang.NoSuchMethodException: org.springframework.security.web.session.ConcurrentSessionFilter.<init>()
任何人都可以帮助我解决这个错误。将非常感谢任何帮助。
1条答案
按热度按时间ajsxfq5m1#
我有同样的错误与 Spring 6。一些布迪帮助我们找到正在发生的事情。