我使用XStream将java中的数组转换为xml。我要添加这一行来使用注释。
XStream xStream = new XStream();
xStream.processAnnotations(CollectionConverter.class);但是它说processAnnotations对xStream还没有定义。我在构建路径中有xstream.jar。我遗漏了什么?
发布于 2015-02-28 11:58:00
XStream processAnnotations方法已经在XStream版本1.3中引入,因为可以使用旧版本的Annotations.configureAliases(XStream xstream, Class<?>... topLevelClasses)方法。
https://stackoverflow.com/questions/28770909
复制相似问题