Spring ConversionFailedException: Failed to convert from type java.util.ArrayList to type java.ut...

org.springframework.core.convert.ConversionFailedException: Failed to convert from type [java.util.ArrayList] to type [java.util.List] 
for value '[/assets/]'; nested exception is org.springframework.core.convert.ConverterNotFoundException:
No converter found capable of converting from type [java.util.ArrayList] to type [org.springframework.core.io.Resource]

原因beanID冲突

源代码样式

    <mvc:annotation-driven conversion-service="conversionService">
        <mvc:message-converters>
            <bean class="org.springframework.http.converter.StringHttpMessageConverter" />
            <bean
                class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter" />
        mvc:message-converters>
    mvc:annotation-driven>
    <bean id="conversionService"
        class="org.springframework.format.support.FormattingConversionServiceFactoryBean">
        <property name="formatters">
            <set>
                <bean class="com.ivlo.crm.extend.MyDateFormatter">bean>
            set>
        property>
    bean>
    <mvc:resources mapping="/assets/**" location="/assets/" />

将conversionService 换一个ID名称 例如 conversionDateService 既可以正常运行了

原因 http://www.cnblogs.com/susua/p/5571590.html

转载于:https://www.cnblogs.com/JNUX/p/7457110.html

你可能感兴趣的:(Spring ConversionFailedException: Failed to convert from type java.util.ArrayList to type java.ut...)