cannot be cast to org.springframework.web.accept.ContentNegotiationManager

Spring boot项目启动报错:spring

https://stackoverflow.com/questions/19199610/spring-issue-with-contentnegotiationmanagerfactorybean中提到:mvc

As Pavel Horal commented, don't use both <mvc:annotation-driven /> and @EnableWebMvc together. That drives Spring mad when it tries to processe already enhanced classes where not-enhanced are expected, thus ClassCast. Simply use either of them.spa

Spring boot项目里面有依赖旧的项目以及配置(xml配置),干掉@EnableWebMvc 就行了code

相关文章
相关标签/搜索