小编Yas*_*min的帖子

Spring Boot 应用程序启动后失败 - 尝试调用不存在的方法。尝试是从以下位置进行的

我是 Spring Boot 的新手,我正在尝试使用 REST Api 构建一个简单的应用程序,在启动应用程序时立即收到此错误:

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2021-01-24 20:08:19.505 ERROR 11344 --- [  restartedMain] o.s.b.d.LoggingFailureAnalysisReporter   : 

***************************
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.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration$EnableWebMvcConfiguration.requestMappingHandlerAdapter(WebMvcAutoConfiguration.java:369)

The following method did not exist:

    'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration.requestMappingHandlerAdapter(org.springframework.web.accept.ContentNegotiationManager, org.springframework.format.support.FormattingConversionService, org.springframework.validation.Validator)'

The method's class, org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration, is available from the following locations:

    jar:file:/C:/Users/user/.m2/repository/org/springframework/spring-webmvc/5.1.3.RELEASE/spring-webmvc-5.1.3.RELEASE.jar!/org/springframework/web/servlet/config/annotation/DelegatingWebMvcConfiguration.class

The …
Run Code Online (Sandbox Code Playgroud)

java spring spring-mvc maven spring-boot

8
推荐指数
1
解决办法
2万
查看次数

标签 统计

java ×1

maven ×1

spring ×1

spring-boot ×1

spring-mvc ×1