Spring CGlib Superclass has no null constructors but no arguments were given

Spring CGlib Superclass has no null constructors but no arguments were given

 

 

       

       

 

出现Superclass has no null constructors but no arguments were given异常

 

 

改成属性注入

 

 

       

       

 

 

或者

创建参数为空的默认构造函数。

 

 

CGlib has one important restriction: the target class must provide a default constructor.

If you use property-based injection instead of constructor-based injection, the problem will go away.

 

or

 

I just created an empty default constructor to deal with this.

 

参考:

https://stackoverflow.com/questions/15223297/superclass-has-no-null-constructors-but-no-arguments-were-given

 

你可能感兴趣的:(Spring)