如果啟動tomcat時,出現了這個瀏覽器出現了javax.servlet.ServletException: Servlet.init() for servlet [DispatcherServlet] threw exception和后臺出現了Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/springframework/core/log/LogDelegateFactory
首先,要看一下是不是spring-mvc.xml的配置注解驅動,是否匯入錯了或者看一下內部資源視圖決議器的bean是否正確.

當這些檢查沒有問題還是出現了錯誤,我們就看一下pom.xml的spring-webmvc是否比spring-context高,我這里就是高了,也是出現錯誤的主要原因!

我就把webmvc改成spring-context一樣的版本!success 哈哈
我是小白,有很多不足.望大佬們不要噴我^_^,我也只是分享一些不是很高深的問題,但有時候又很浪費事件的例外^_^,仔細看了自己寫的代碼完全沒有問題,但就是找不原因??.
僅僅為了一些不是很重要操作,浪費了寶貴時間這太太太不劃算了
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/13913.html
標籤:Java
上一篇:多執行緒筆記
