杰克逊XML到Pojo-不带包装的阵列

时间:2018-08-27 14:49:16

标签: java spring-boot jackson-dataformat-xml

我有一个具有相同属性的标签列表,但是没有包装元素来使其成为arraylist ..如何在Java Spring-boot应用程序中将其作为arraylist保存?

using msvc : 9.0~CEPlatformName : "cl.exe" :
    <compileflags>-D_CRT_SECURE_NO_WARNINGS
    <compileflags>-D_CRT_SECURE_NO_DEPRECATE
    <compileflags>-DBOOST_PROTO_MAX_ARITY=10
    <compileflags>-DBOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
    <compileflags>-DBOOST_MPL_LIMIT_METAFUNCTION_ARITY=10
    <compileflags>-D_WIN32_WCE=0x700
    <compileflags>-DUNDER_CE
    <compileflags>-DWINCE
    <compileflags>-DARM
    <compileflags>-D_ARM_
    <compileflags>-DARMV4I
    <compileflags>-D_LITTLE_ENDIAN
    <compileflags>-D_UNICODE
    <compileflags>-DUNICODE
    <compileflags>-D_MSC_VER=1500
    <linkflags>/subsystem:windowsce,7.00 
    <linkflags>/MACHINE:THUMB
    <linkflags>/NODEFAULTLIB:oldnames.lib
    <linkflags>/NODEFAULTLIB:libc.lib
    <linkflags>coredll.lib
    <linkflags>corelibc.lib
    <linkflags>ole32.lib
    <linkflags>oleaut32.lib
    <linkflags>uuid.lib
    <linkflags>commctrl.lib
    <architecture>arm
    <instruction-set>armv4
    <interface>wince
    <setup>CEPlatformName.bat;

1 个答案:

答案 0 :(得分:3)

尝试像这样在VouchInfo类中注释列表字段:

@JacksonXmlProperty(localName = "Currency")
@JacksonXmlElementWrapper(useWrapping = false)
private List<Currency> currency;