has been injected into other beans[XXXXXXXXXX] in its raw version as part of a circular reference
最近項目在重構,代碼層面的優化,然後從svn更新代碼之後,啟動tomcat報出下面這個異常
找了很久,試了很多方法,比如懶加載,沒作用,查找spring配置文件,也沒問題,最後發現了spring的循環依賴,就是ServiceA 引用 ServiceB,ServiceB又引用了 ServiceA ,如果代碼這樣寫,spring在初始化的時候根本不知道要把哪個bean裝入容器,導致bean加載失敗
實際上在代碼設計的時候,就不能這樣寫,盡量做到解耦,抽出公共部分新建一個service,因為我這邊SericeA只有一個方法引用到了ServiceB,所以我把這個方法寫進了ServiceB,然後去掉了@Autowire ServiceB,這樣就不會報錯啦!!!!
最後啰嗦一句,因為我不經常寫博客,今天有空,剛好碰到問題就記錄下來了,各位大佬手下留情哈!!!!
has been injected into other beans[XXXXXXXXXX] in its raw version as part of a circular reference
相關推薦
has been injected into other beans[XXXXXXXXXX] in its raw version as part of a circular reference
rcu raw 初始化 its 如果 加載 cat 初始 方法 最近項目在重構,代碼層面的優化,然後從svn更新代碼之後,啟動tomcat報出下面這個異常 找了很久,試了很多方法,比如懶加載,沒作用,查找spring配置文件,也沒問
Bean with name 'xxxService' has been injected into other beans [xxxServiceA,xxxServiceB] in its raw version as part of a circular reference, b
啟動專案,通過@Autowired注入物件,出現迴圈依賴,導致專案啟動失敗,具體報錯資訊如下: Exception encountered during context initialization - cancelling refresh attempt: org.springf
暫時解決java.lang.IllegalStateException: It is invalid to call isReady() when the response has not been put into non-blocking mode
服務器 lose img () arguments it is 分享 exc 解決 環境: 本機-apache-tomcat-9.0.0.M21 服務器-apache-tomcat-9.0.0.M9 錯誤復盤: 最初不知道是tomcat版本解決的,實現了
解決myeclipse報錯Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJ
本篇文章是一種常規的解決方式,對於新手,以做參考,順便記錄成長曆程。 報錯的全部資訊為:Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library
no schema has been selected to create in … error 解決方案
What is the search path? Per documentation: [...] tables are often referred to by unqualified names, which consist of just the
lnmp -- 解決Warning: scandir() has been disabled for security reasons in…的問題
原因:LNMP 0.9禁用了部分存在危險的PHP函式 LNMP0.9禁用的PHP函式包括:passthru, exec, system, chroot, scandir, chgrp, chown, shell_exec, proc_open, proc_get_status, ini_alte
CentOS下連VisualSVN伺服器時報SSL handshake failed: SSL error: Key usage violation in certificate has been d
CentOS/RHEL yum 預設安裝的 subversion 是 1.6.11 版本,連VisualSVN伺服器時或變更svn地址定位時會有"Key usage violation"的錯誤,如下 svn: OPTIONS of ' https://.../server': SSL
Ask HN: Who has been the most influential person in your life?
Just curious where others may be coming from in life. Has the most important person who helped make you who you are been a family member, friend, or possib
iOS常見問題之 The 'Apple Developer Program License Agreement' has been updated. In order to access certai
The ‘Apple Developer Program License Agreement’ has been updated. In order to access certain membership resources, you must accept
ArcGIS “Error HRESULT E_FAIL has been returned from a call to a COM component.” 異常的解決
exce run sys 簡單 mpc mco pre amp back 錯誤提示內容: {System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been re
Namespace declaration statement has to be the very first statement in the script
ont 文件 space pac .net button php 解決 img php 中 Namespace declaration statement has to be the very first statement in the script 錯誤解決方
This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its de 錯誤解決辦法
rep data- button title box mysq set read .net 這是我們開啟了bin-log, 我們就必須指定我們的函數是否是1 DETERMINISTIC 不確定的2 NO SQL 沒有SQl語句,當然也不會修改數據3 READS SQL D
make: Warning: File `Makefile' has modification time 1.8e+06 s in the future
通過 系統 -m time war rom 我想 warning mes 通過這個錯誤提示信息我們可以知道,Makefile的修改時間點是Linux當前的一個未來時間點。可以通過修改Linux的當前時間來解決這個問題: $sudo date -s ‘hh:mm:ss yy
No application encryption key has been specified.
specified tis 根目錄 es2017 artisan ges encrypt php san 環境:php7.1.10laravel5.5出現: 解決:在根目錄下執行: php artisan key:generate OK問題解決No applicat
.Net C# 串口 Serialort safe handle has been closed 問題的解決
人在 詭異 final 得到 strong 內部 函數 國外 最終 最近在一個平臺上使用SerialPort類開發程序時,發現程序在使用SerialPort類時會異常退出,而且詭異的是,就算把所有操作串口的代碼都放在try{}catch{}塊中也無法捕獲這個異常。最終,在國
This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its 錯誤解決辦法
eat blog clas min clear gin bsp term rmi This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and
flume異常崩潰 File has been modified since being read
conf dep info rep 問題 pooled string ext.get 發現 日誌采集異常,生產報錯誤日誌: (org.apache.flume.source.SpoolDirectorySource$SpoolDirectoryRunnable.run:28
solr部署tomcat 訪問HTTP Status 403 – Access to the requested resource has been denied
height AC target win7 denied erl 重啟 出現 ora -----------解決403錯誤看這裏!!-----------打開****\Tomcat 8.5\webapps\solr\WEB-INF裏面的web.xml,把下面這段配置註釋掉!
this license has been cancelled
技術分享 技術 system32 分享 打開 system etc 方案 rain 是因為IDEA註冊碼的問題, 解決方案: 修改此路徑的hosts文件:C:\Windows\System32\drivers\etc\hosts 在其最後一行加入:“0.0.0.0 acc
Cannot create a session after the response has been committed的處理
span 表示 ESS mov ssi AC clear 判斷 cti 情景:在導出excel導出過程中前臺提示“正在導出,請稍等...”,導出結束後提示信息自動消失。 但導出結束後就報如上錯誤,不可能相應兩次。 解決:主要是判斷導出結束的時間點,確認導出結束時間。通過co