关于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