org.hibernate.InstantiationException: No default constructor for entity 原因是给对应类加了有参数的构造函数,但是没有无参数的构造函数,加上无参构造就不报错了。 以后肯定还会忘,记录下来。