关于xstream的错误 it does not have a no-args constructor

Exception in thread "main" com.thoughtworks.xstream.converters.ConversionException

Cannot construct ddd.ajava.chapter7.question2.Address as it does not have a no-args constructor :

Cannot construct ddd.ajava.chapter7.question2.Address as it does not have a no-args constructor

如图所示:

解决方法:给错误的类添加无参构造方法。

(记录踩过的坑)

猜你喜欢

转载自blog.csdn.net/qq_38666896/article/details/86427577