在更新到Spring 2.6.4之后,当我试图调用rest控制器时,我得到了这个错误:
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration': Unsatisfied dependency expressed through method 'setFilterChainProxySecurityConfigurer' parameter 1; nested exception is org.springframework.beans.factory.BeanExpressionException: Expression parsing failed; nested exception is java.lang.NoSuchMethodError: 'java.lang.reflect.Method org.springframework.util.ClassUtils.getInterfaceMethodIfPossible(java.lang.reflect.Method, java.lang.Class)'这个问题要到2.6.3才会发生
我试着补充:
@EnableWebSecurity
@EnableWebMvc对我的WebSecurityConfigurerAdapter类来说,但是这并没有什么区别。
发布于 2022-03-19 07:39:54
Spring 2.6.4应该与SpringFramework5.3.16一起使用,但是您使用的是早期版本。您需要更新Maven或Gradle配置来纠正这种情况。我建议使用Spring的依赖关系管理来保持版本的同步。
https://stackoverflow.com/questions/71535619
复制相似问题