这个文件缺少依赖项,现在我被卡住了。我错过了什么?
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/Users/Claudio/.m2/repository/ch/qos/logback/logback-
classic/1.2.3/logback-classic-1.2.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/Users/Claudio/.m2/repository/org/slf4j/slf4j-
log4j12/1.6.6/slf4j-log4j12-1.6.6.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
SLF4J: The requested version 1.7.16 by your slf4j binding is not compatible with [1.6]
SLF4J: See http://www.slf4j.org/codes.html#version_mismatch for further details.
. ____ _ __ _ _
/\ / ___'_ __ _ _(_)_ __ __ _
( ( )___ | '_ | '_| | '_ / _` |
\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |___, | / / / /
=========|_|==============|___/=/_/_/_/
[32m :: Spring Boot :: [39m [2m (v2.3.2.RELEASE)[0;39m
[2m2021-01-27 11:37:36.187[0;39m [32m INFO[0;39m [35m16692[0;39m [2m---[0;39m [2m[
main][0;39m [36msim1.awakelab.sim1Application [0;39m [2m:[0;39m Starting
sim1Application on DESKTOP-MTELQ59 with PID 16692
(C:UsersClaudioDocumentsProgramaciónSimulacrossim1targetclasses started by Claudio in
C:UsersClaudioDocumentsProgramaciónSimulacrossim1)
[2m2021-01-27 11:37:36.189[0;39m [32m INFO[0;39m [35m16692[0;39m [2m---[0;39m [2m[
main][0;39m [36msim1.awakelab.sim1Application [0;39m [2m:[0;39m No active profile set,
falling back to default profiles: default
[2m2021-01-27 11:37:36.279[0;39m [31mERROR[0;39m [35m16692[0;39m [2m---[0;39m [2m[
main][0;39m [36mo.s.b.d.LoggingFailureAnalysisReporter [0;39m [2m:[0;39m
***************************
APPLICATION FAILED TO START
***************************
Description:
An attempt was made to call a method that does not exist. The attempt was made from the following
location:
org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors
(PostProcessorRegistrationDelegate.java:99)
The following method did not exist:
org.springframework.core.metrics.ApplicationStartuporg.springframework.beans.factory.config.ConfigurableListableBeanFactory.getApplicationStartup () '
The method's class, org.springframework.beans.factory.config.ConfigurableListableBeanFactory, is
available from the following locations:
jar:file:/C:/Users/Claudio/.m2/repository/org/springframework/spring-beans/5.2.8.RELEASE/spring-
beans-
5.2.8.RELEASE.jar!/org/springframework/beans/factory/config/ConfigurableListableBeanFactory.class
The class hierarchy was loaded from the following locations:
org.springframework.beans.factory.config.ConfigurableListableBeanFactory:
file:/C:/Users/Claudio/.m2/repository/org/springframework/spring-beans/5.2.8.RELEASE/spring-beans-
5.2.8.RELEASE.jar
Action:
Correct the classpath of your application so that it contains a single, compatible version of
org.springframework.beans.factory.config.ConfigurableListableBeanFactory
我不知道我是否缺少一些配置文件或什么,但我已经创建了主类和方法的注释SpringBootApplication和添加了spring核心依赖。
您有不兼容的ConfigurableListableBeanFactory
方法版本。
尝试在pom.xml中添加以下内容(如果依赖项不存在)
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>2.3.2.RELEASE</version>
</dependency>
如果你有依赖项,检查它是否与Spring版本相同
转到C:/Users/Claudio/.m2/repository/org/springframework/spring-context
。检查您是否有多个版本的spring-context,如5.2.8.RELEASE
和其他版本。如果你有太多的版本,删除除了2.3.2
之外的所有版本。因为似乎正在读取其他版本文件,而不是实际的版本文件。