Java.lang.InstantiationException
Instantiate the exception. This exception is thrown when an attempt is made to create an instance of a class through the newinstance () method, which is an abstract class or interface.
This project queries the type when using this exception, carefully check the entity class and Hibernate entity mapping files are one by one corresponding,
The reason for this error is that there is no constructor with no parameters in the entity class type, because Hibernate constructs the object using a constructor that takes no parameters in the object establishment.
And now my type class has only one constructor with parameters and a series of getter/setter methods.
There is a clear requirement in hibernate that each persisted class must have a constructor with no arguments.
So the solution is to add an parameterless construction method to the entity class, which does not have to do anything, just like the default construction method.
Code space Project--exception of Instantiationexception