SpringBoot单元测试启动报错

主要错误信息:java.lang.IllegalStateException: Failed to load ApplicationContextCaused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'requestMappingHandlerAdapter' defined in class path resource [org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]...这是什么情况造成的呢,附上主要代码图,请各位帮忙指点下,感激不尽

千万里不及你
浏览 1343回答 2
2回答

慕的地6264312

requestMappingHandlerAdapter这个类没有注入到spring里面,检查这个类是不是添加上了spring注解,或则在xml文件声明了。还有可能就是requestMappingHandlerAdapter这类里面注入里其他类失败了。导致这个类注入失败。

12345678_0001

能不 能给一个准确答案阿!
打开App,查看更多内容
随时随地看视频慕课网APP