idea内嵌jetty运行springmvc项目报ConversionFailedException

 

22:35:50.609 [Scanner-0] DEBUG o.s.beans.TypeConverterDelegate - Original ConversionService attempt failed - ignored since PropertyEditor based conversion eventually succeeded

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 '[/WEB-INF/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.1.RELEASE.jar:3.2.1.RELEASE]

at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:169) ~[spring-core-3.2.1.RELEASE.jar:3.2.1.RELEASE]

at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:161) ~[spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]

at org.springframework.beans.BeanWrapperImpl.convertIfNecessary(BeanWrapperImpl.java:448) [spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]

at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:494) [spring-beans-3.2.1.RELEASE.jar:3.2.1.RELEASE]

……

 

-----------------------------

此问题之前也有朋友站内信我。该错误是因为:

1、内嵌jetty在运行时会锁定静态资源;因此在运行过程中不能删除静态资源;

2、问题的根源是启动了多个jetty实例,但是实际没有报端口冲突,可以检查任务管理器看是否有多个java/javaw进程在运行,如果是杀掉进程然后重试。

 

 

你可能感兴趣的:(conversion)