天天看點

Guns啟動報錯:Failed to read candidate component class: URL

故事的開始:

我從網上下載下傳了一個guns項目,然後修改了配置,結果報錯,錯誤提示如下:

org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: URL [jar:file:/C:/Users/hp/.m2/repository/org/apache/tomcat/embed/tomcat-embed-core/8.5.29/tomcat-embed-core-8.5.29.jar!/org/apache/catalina/mapper/Mapper.class]; nested exception is java.lang.ArrayIndexOutOfBoundsException: 62476

然後,我就問了小夥伴,小夥伴是這樣說的 “maven的褲子爛了,把maven遠端倉庫修改成阿裡雲的吧。”

我就大概明白了,可能是maven庫有問題。是以,

解決方法:

将錯誤定位到  /Users/hp/.m2/repository/org/apache/tomcat/embed/tomcat-embed-core/ 檔案夾下,

Guns啟動報錯:Failed to read candidate component class: URL

然後删除8.5.29檔案夾。idea中重新整理maven重新導入。就可以了。

Guns啟動報錯:Failed to read candidate component class: URL

拓展知識:maven倉庫清理緩存檔案(dos工具)

繼續閱讀