Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/python-3.x/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 没有处理程序的适配器:DispatcherServlet配置需要包括支持此处理程序的HandlerAdapter_Java_Spring_Spring Boot_Spring Mvc - Fatal编程技术网

Java 没有处理程序的适配器:DispatcherServlet配置需要包括支持此处理程序的HandlerAdapter

Java 没有处理程序的适配器:DispatcherServlet配置需要包括支持此处理程序的HandlerAdapter,java,spring,spring-boot,spring-mvc,Java,Spring,Spring Boot,Spring Mvc,我们正在从Spring4.x迁移到Spring5.2.13版本。在Spring4中,这是可行的,但在Spring5.x中,我们得到了DispatcherServlet的以下错误 javax.servlet.ServletException:处理程序没有适配器:DispatcherServlet配置需要包含支持此处理程序的HandlerAdapter 位于org.springframework.web.servlet.DispatcherServlet.getHandlerAdapter(Disp

我们正在从Spring4.x迁移到Spring5.2.13版本。在Spring4中,这是可行的,但在Spring5.x中,我们得到了DispatcherServlet的以下错误

javax.servlet.ServletException:处理程序没有适配器:DispatcherServlet配置需要包含支持此处理程序的HandlerAdapter 位于org.springframework.web.servlet.DispatcherServlet.getHandlerAdapter(DispatcherServlet.java:1275) 位于org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1023) 位于org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943) 位于org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) 位于org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898) 位于javax.servlet.http.HttpServlet.service(HttpServlet.java:621) 位于org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) 位于javax.servlet.http.HttpServlet.service(HttpServlet.java:728) 位于org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) 位于org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) 位于org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

调度程序servlet映射:

**dispatcher servlet映射:**
/settingsView=settingsView控制器

您可能需要为
@RequestMapping
指定映射,如
@RequestMapping('/')
更改以下内容:

@Controller
@RequestMapping
为此:

@Controller
i、 e.从类中删除
@RequestMapping
注释;
它没有提供任何价值。

我通过在DispatcherXML中使用mvc:annotation-driven/解决了这个问题


AnnotationMethodHandlerAdapter已从弹簧5上拆下。因此,当从Spring 4.x迁移到Spring 5.2.13时,我遇到了适配器问题。

如何格式化您的问题以使其可读?很抱歉格式化,我再次格式化了我的问题,但这仍然没有用error@nandanpandey错误在其他地方,然后我尝试删除@RequestMapping,但仍然得到错误