maven + spring專案 在eclipse中沒問題在idea卻報錯:could not autowired
從其他地方找找到的答案記錄一下
解決辦法1:
從根本上解決:
File-Project Structure 頁面 Facets下刪掉 Spring(直接右鍵Delete)
這個解答是對的。並不會降低安全性!!
因為建立專案的時候,都是先建立空專案再建立web moduele(你想直接建立web project也可以),一般不會使用spring元件。都是自己配置的。
這時候你要是不小心手滑(手滑原因:因為idea對你spring的配置檔案會在上方報警告,然後你一fix,就容易出事),那就會報錯無法Autowired。
所以你只要刪掉你手滑新增的就可以
解決辦法2:
降低Autowired檢測的級別,不要提示就OK
tellij Idea @Autowired取消提示
Spring bean通過@Autowired注入,spring auto scan配置,在編輯情況下,無法找不到對應的bean,於是提示找不到對應bean的錯誤。
但build專案是能正常執行的。
可在File – Settings – Inspections。使用搜索功能 找到 Autowired for Bean Class ,
將Severity的級別由之前的error改成warning或其它可以忽略的級別。
相關推薦
maven + spring專案 在eclipse中沒問題在idea卻報錯:could not autowired
從其他地方找找到的答案記錄一下 解決辦法1: 從根本上解決: File-Project Structure 頁面 Facets下刪掉 Spring(直接右鍵Delete) 這個解答是對的。並不會降低安全性!! 因為建立專案的時候,都是先建立空專案再建立
Eclipse中啟動Tomcat時(MAVEN專案),報錯:Could not publish to the server. java.lang.IndexOutOfBoundsException的解決過程
Eclipse中啟動Tomcat時(MAVEN專案),報錯:Could not publish to the server. java.lang.IndexOutOfBoundsException,tomcat啟動失敗, 原因:該MAVEN專案下載的本地jar包存在下載失敗的情況 &nbs
Eclipse中新增Tomcat伺服器報錯:Cannot create a server using the selected type 導致不能點選next
今天在eclipse想把之前的Tomcat 6刪掉,重新配置一個,不料沒有下一步 Cannot create a server using the selected type 這句話出現在視窗上面,應該不是很解決的問題....... 重啟下 eclipse,還是不行哦 出絕招了。。。上網
通過IDEA(2018.2.4)從碼雲(gitee)克隆專案報錯:Could not read from remote repository.
SSH已經配好 有的教程裡將git配置裡邊的SSH executable已經選擇為native 這些仍然沒有用 最後在gitee設定中發現自己勾選了標紅的地方,嘗試取消,克隆成功,問題忽然解決。 所以不要勾選紅框裡的內容
intellij idea更新gradle專案報錯:Could not run build action using Gradle distribution
intellij idea中有一個gradle專案,之前都一直是好好的。 今天在build.gradle中添加了一個dependency,由於我並沒有設定auto-import,所以選擇自己來refresh整個gradle專案 結果gradle task後臺stuck在
Intellij IDEA報錯:Could not save application settings: java.io.IOException: java.lang.AssertionError: Unexpected content storage modificat
mini dst his process ssa 本地 while app ioe Question: i have a message saying "Could not save application settings: java.io.IOException:
IntelliJ idea 報錯:Could not autowire,no beans of "XXX" type found
pan 踩坑 blog beans tail war 詳情 參考 spec Question:使用 IDEA 開發Java web項目時,在註解 @Autowired 裝配 dao 時顯示:Could not autowire,no beans of "XXX" type
eclipse報錯: Could not generate secret
image 信息 分享圖片 inf edi info png mage bubuko 在調用微信接口時,出現一個錯誤: 一直以為是接口調用問題,經多方查詢和嘗試解決,最後找到根源: edit-->使用default就可以了。 原因: 在eclipse中運行時,把
eclipse啟動報錯:Could not create the java virtual machine
報錯 解壓 java 開發 升級 最新 分享 src info 用maven、springboot開發時,安裝了當時最新版的eclipse(3.5.5)。eclipse解壓版的非常方便,想先安裝了看看。暫時沒有升級其他軟件。 打開的時候報錯: 原因其實就是還木有升級新版
CentOS6.x中vmware workstation 虛擬機器啟動報錯:Could not open /dev/vmmon
最初安裝報錯,但是介面可以開啟,可以正常安裝,但是安裝過後,啟動報錯 Gtk-Message: Failed to load module "canberra-gtk-module": libcanberra-gtk-module.so:cannot open sh
IDEA中,Maven專案POM檔案中的依賴未報錯(出現紅色波浪線),但Maven Projects中的模組的Dependencies中的依賴卻報錯
問題描述: IDEA中,Maven專案POM檔案中的依賴未報錯(出現紅色波浪線),但Maven Projects中模組的Dependencies依賴卻報錯。 問題出現的場景: 將本地Maven倉庫的地址從C盤更換到其他盤,新倉庫中jar包存在。 問題分析: 1、
eclipse專案中request.getLocalPort()方法報錯:
eclipse專案編譯報錯The method getLocalPort() is undefined for the type HttpServletRequest 原因及解決辦法: j2ee.jar包中的servlet版本或者是jboss中的servle
maven專案打jar包的時候報錯:Failed to execute goal on project xxxx: Could not resolve dependencies for project
maven專案要打包成jar部署到伺服器上的時候報類似的錯: Failed to execute goal on project xxxx: Could not resolve dependencies for project xxxxxx:xxx:jar:0.
eclipse中方法註釋@Override報錯解決
專案中一個serviceImpl的方法上有@Override,然後報錯“The method modifyTime(RepairInfo) of type RepairServiceImpl must override a superclass method”。
關於 eclipse 中R類檔案報錯
當匯入專案到eclipse時,總會出現錯誤,比如說gen目錄下R類丟失,或缺少語句,我總結了一下解決方法。 當R類丟失時: 第1種方法:右擊工程->選擇Android Tools->選擇Fix Project Properties 第2種方法
Eclipse中xml配置檔案報錯原因總結
1)使用Eclipse開發工具,從SVN或者GIt上down下來的專案有的XML檔案報錯(提交上去的程式碼都是沒有問題的),而在本地Eclipse中卻顯示有問題,一般原因是Eclipse中對專案工程的校驗,點工程右鍵>Properties>Validation
vue專案在IE中顯示空白,報錯:vuex requires a Promise polyfill in this browser
問題描述vue專案在非IE核心的瀏覽器中顯示正常,在IE核心瀏覽器中報錯,並顯示空白。報錯如下:SCRIPT5022: [vuex] vuex requires a Promise polyfill in this browser.SCRIPT5009: “Promise”
IntelliJ Idea編譯報錯:無效的源發行版 1.7
tell blog tin pom compile 2.0 無效 編譯 編譯報錯 2018.02.03 Sat 今天重新啟動了之前部署的項目,發現啟動不了,提示:無效的源發行版 1.7 想到之前換過jdk版本,之前用的是1.8現在是1.6 去Project Structur
Centos7 JDK安裝過程中 解決java -version 報錯: bash: /home/jdk1.8.0_161/bin/java: Permission denied
IT version run centos 過程 mis hotspot 5.1 exp 1.執行Linux命令 -----vim /etc/profile 編輯profile 文件,在裏面添加: #set java enviroment JAVA_HOME=/opt/
AndroidStudio導入Eclipse項目報錯Error:Could not determine the class-path for interface com.android.builder.model.AndroidProject
and art cli mode log RF details get ID AndroidStudio導入Eclipse項目報錯 Error:Could not determine the class-path for interface com.android.buil