我有这门课
@XStreamAlias("myConfig")
public class MyConfig {
... // other properties
// What do I put here?
private List<String> includes;
}
我想要这个输出:
<myConfig>
...
<includes>
<includes>foo</include>
<includes>bar</include>
</includes>
</myConfig>
这不起作用,因为元素丢失了:
@XStreamImplicit(itemFieldName = "include") // Loses <includes> element
private List<String> includes;