我有一个Apache Camel bean(GsonDataFormat),其属性为java.lang.reflect.Type
。问题是我尝试通过xml填充此属性,但收到org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'java.lang.String' to required type 'java.lang.reflect.Type'
这是我的xml代码
<bean id="orderDtoDataFormat" class="org.apache.camel.component.gson.GsonDataFormat">
<property name="unmarshalGenericType" value="java.util.List"/>
<property name="dateFormatPattern" value="yyyy-MM-dd'T'HH:mm:ss.SSSXXX"/>
</bean>
如果我声明类型为Type
的bean并将此bean注入
<property name="unmarshalGenericType" ref="nameOfTheBean"/>
谢谢