报错: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 '[/js/]'; 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
处理:当有mvc:resources时不能以conversionService为bean的id,改名即可。
本文解决了一个关于Spring MVC中资源加载的问题,具体表现为从ArrayList转换到Resource类型时出现的异常。文章指出,在配置文件中使用mvc:resources时,不应将conversionService作为bean id,而是需要更改其名称。

被折叠的 条评论
为什么被折叠?



