Failed to convert from type [java.util.ArrayList

org.springframework.core.convert.ConversionFailedException: Failed to convert from type java.util.ArrayList<?> to type java.util.List<org.springframework.core.io.Resource> for value '[/static/]'; nested exception is org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type java.lang.String to type org.springframework.core.io.Resource
at org.springframework.core.convert.support.ConversionUtils.invokeConverter(ConversionUtils.java:41) ~[spring-core-3.2.10.RELEASE.jar:3.2.10.RELEASE]

<bean id="conversionService" class="org.springframework.format.support.FormattingConversionServiceFactoryBean" />
<mvc:resources location="/static/" mapping="/static/**" cache-period="864000" />

加载静态资源和日期统一转换冲突,将加载静态资源注释掉,然后加上一下即可
<mvc:default-servlet-handler />

 

https://blog.csdn.net/StringBuff/article/details/97930660

posted @ 2024-01-24 17:56  zbjice  阅读(176)  评论(0)    收藏  举报