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

相關文章
相關標籤/搜索