關於org.springframework.beans.BeanInstantiationException: Failed to instantiate [java.util.List]:Specified class is an interface


報錯原因:

  spring在注入的時候不允許注入一個List類型的對象,才會導致報上訴錯誤;

解決辦法:

  ①:改變為數組方式去接收;(我沒用)

  ②:再把這個“List<WorkFinalStatmentVo> statmentVoList” 封裝成一個對象------->StatmentVoList  statmentVoList,生成get,set方法,將對象注入;

  ③:。。。或許還有其他的辦法解決,有的話請大神賜教! 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



猜您在找 org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [java.util.List]: Specified class 【spring mvc】后台spring mvc接收List參數報錯如下:org.springframework.beans.BeanInstantiationException: Failed to instantiate [java.util.List]: Specified class is an interface 異常 Failed to instantiate [java.util.List]: Specified class is an interface SpringMVC使用MultipartFile上傳文件報錯【org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.multipart.MultipartFile]: Specified class is an interface】 Failed to instantiate [java.util.List]: Specified class is an interface Failed to instantiate [java.util.List]: Specified class is an interface org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.jboss.resteasy.plug springmvc上傳文件報錯org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.web.multipart.MultipartFile] org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.hs.model.StudentModel]: No default constructor found; nested exception is java.lang.NoSuchMethodException: c Springboot啟動報錯Error creating bean with name 'xxx' defined in URL [xxx]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate...
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM