码迷,mamicode.com
首页 > 编程语言 > 详细

org.springframework.beans.BeanInstantiationException: Failed to instantiate [demo.Words]: No default constructor found; nested exception is java.lang.NoSuchMethodException: demo.Words.<init>()

时间:2018-10-22 22:46:14      阅读:1071      评论:0      收藏:0      [点我收藏+]

标签:work   ram   class   led   beans   bst   ini   eth   framework   

org.springframework.beans.BeanInstantiationException: Failed to instantiate [demo.Words]:
No default constructor found; nested exception is java.lang.NoSuchMethodException: demo.Words.<init>()
或者是:

org.springframework.beans.BeanInstantiationException: Failed to instantiate [Daomain.User]: Is it an abstract class?; nested exception is java.lang.InstantiationException: Daomain.User

 

这个异常就是实体类的构造函数引起的  

解决方法:

要么不设置构造函数;

要么设置满参构造函数和空参函构造数;..

org.springframework.beans.BeanInstantiationException: Failed to instantiate [demo.Words]: No default constructor found; nested exception is java.lang.NoSuchMethodException: demo.Words.<init>()

标签:work   ram   class   led   beans   bst   ini   eth   framework   

原文地址:https://www.cnblogs.com/mljqqh/p/9833563.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!