Specified class is an interface

来源:互联网 发布:ubuntu使用手册 编辑:程序博客网 时间:2024/06/05 01:12
今天在写代码的时候,碰到了一个问题,在运行的过程中被过滤器拦截下来了。错误提示是:Specified class is an interface。很无语,没见过这个错误。

报错信息:

严重: Servlet.service() for servlet [atscloud] in context with path [/web] threw exception [Request processing failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [java.util.List]: Specified class is an interface] with root causeorg.springframework.beans.BeanInstantiationException: Failed to instantiate [java.util.List]: Specified class is an interface    at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:101)    at org.springframework.web.method.annotation.ModelAttributeMethodProcessor.createAttribute(ModelAttributeMethodProcessor.java:137)    at org.springframework.web.servlet.mvc.method.annotation.ServletModelAttributeMethodProcessor.createAttribute(ServletModelAttributeMethodProcessor.java:80)    at org.springframework.web.method.annotation.ModelAttributeMethodProcessor.resolveArgument(ModelAttributeMethodProcessor.java:106)    at org.springframework.web.method.support.HandlerMethodArgumentResolverComposite.resolveArgument(HandlerMethodArgumentResolverComposite.java:77)    at org.springframework.web.method.support.InvocableHandlerMethod.getMethodArgumentValues(InvocableHandlerMethod.java:162)    at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:129)    at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110)    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:777)    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:706)    at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:943)    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:877)    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:966)    at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:868)    at javax.servlet.http.HttpServlet.service(HttpServlet.java:646)    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:842)    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)

让人无语的时候我的controller中传入的字段没有加requestParam,吐血。
java

//送审@RequestMapping(value="/sendToApprove.do",method= RequestMethod.POST)@ResponseBodypublic Map<String, String> sendToApprove(List<String> passelNos, List<String> childs, HttpSession session){    Map<String, String> map = new HashMap<String, String>();    try {

java
加上requestparam就行了,记录一下,以免以后再出现这种错误

阅读全文
0 0