`

The DispatcherServlet configuration needs to include a HandlerAdapter that suppo

    博客分类:
  • bug
 
阅读更多
代码如下,项目启动成功,访问报错
@Controller("/demo")
@ResponseBody
public class DemoController {

    @GetMapping("/testDemo")
    public String testDemo(){
        return "我是一个demo";
    }


2023-02-17 14:23:25.809 ERROR 1720 --- [nio-8083-exec-7] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [No adapter for handler [com.jbx.learnspringboot.controller.demo.DemoController@76cb6382]: The DispatcherServlet configuration needs to include a HandlerAdapter that supports this handler] with root cause




原因@Controller中不能添加路径
需要用RequestMapping去添加
分享到:
评论

相关推荐

    SpringMVC工作原理.docx

    4、 DispatcherServlet调用HandlerAdapter处理器适配器。 5、 HandlerAdapter经过适配调用具体的处理器(Controller,也叫后端控制器)。 6、 Controller执行完成返回ModelAndView。 7、 HandlerAdapter将controller...

    springmvc开发资料

    4、 DispatcherServlet调用HandlerAdapter处理器适配器。 5、 HandlerAdapter经过适配调用具体的处理器(Controller,也叫后端控制器)。 6、 Controller执行完成返回ModelAndView。 7、 HandlerAdapter将...

    Pivotal Certified Spring Web Application Developer Exam(Apress,2015)

    Prepare for the Pivotal Certified Spring Web Application Developer exam and learn about Spring MVC DispatcherServlet configuration, Spring MVC programming model essentials, Spring MVC views and form ...

    org.springframework.web.servlet-3.1.0.RELEASE

    * both to make it possible for a controller to return both model * and view in a single return value. * * <p>Represents a model and view returned by a handler, to be resolved * by a ...

    Spring SpringMVC 简单整合

    4、 DispatcherServlet调用HandlerAdapter处理器适配器。 5、 HandlerAdapter经过适配调用具体的处理器(Controller,也叫后端控制器)。 6、 Controller执行完成返回ModelAndView。 7、 HandlerAdapter将...

    Spring MVC 学习笔记

    3、 DispatcherServlet再把请求转交给HandlerAdapter,HandlerAdapter将会把处理器包装为适配器,从而支持多种类型的处理器(适配器模式).简单点说就是让我们知道接下来应该调用Handler处理器里面的什么方法 4、 ...

    spring的jar包解决:DispatcherServlet

    org.springframework.web.servlet.DispatcherServlet java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet at org.apache.catalina.loader.WebappClassLoader.loadClass ...

    Pro Spring MVC With Web Flow

    What you'll learn Key Spring Framework fundamentals How to use the Spring MVC architecture How to develop with the DispatcherServlet How to write Controllers How to work with Resolving and ...

    sprigmvc图文总结

    4、前端控制器(DispatcherServlet)调用处理器适配器(HandlerAdapter)去执行处理器(Handler)。 5、处理器适配器去执行Handler。 6、处理器执行完给处理器适配器返回ModelAndView。 7、处理器适配器向前端控制器...

    SpringMVC DispatcherServlet重写、自定义拦截器拦截器源码

    SpringMVC DispatcherServlet重写、自定义拦截器拦截器源码

    ML精选面试题(选题中).docx

    (4)、 DispatcherServlet(前端控制器)调用HandlerAdapter处理器适配器。 (5)、 HandlerAdapter(处理器适配器)经过适配调用具体的处理器(Controller,也叫后端控制器)。 (6)、 Controller(后端控制器)...

    spring-boot-reference.pdf

    Connection to a Production Database 29.1.3. Connection to a JNDI DataSource 29.2. Using JdbcTemplate 29.3. JPA and “Spring Data” 29.3.1. Entity Classes 29.3.2. Spring Data JPA Repositories 29.3.3. ...

    springboot2 配置多个DispatcherServlet 处理.do .htm请求,Controller分离,集成druid和mybatis

    Springboot 2.4.4 网上搜到的配置多个DispatcherServlet 都有坑,自己避坑写的一个demo,处理.do .htm请求,Controller分离不会出现一个Controller可以处理.do也处理.htm可自己扩展.action .json等,适合分离前台...

    手撸springMvc源码【一】

    文章目录1. springMvc基本概念2. springMvc 核心流程3. 涉及的核心类4. 涉及的核心注解5....DispatcherServlet (前置控制器) HandlerAdapter(处理适配器) HandlerMapping (处理请求的映射) HandlerExecutio

    DispatcherServlet 和 ContextLoaderListener 区别

    NULL 博文链接:https://angie.iteye.com/blog/2334955

    Manning.Spring.in.Action.4th.Edition.2014.11.epub

    2.3.1. Creating a configuration class 2.3.2. Declaring a simple bean 2.3.3. Injecting with JavaConfig 2.4. Wiring beans with XML 2.4.1. Creating an XML configuration specification 2.4.2. Declaring a ...

    Spring MVC之DispatcherServlet_动力节点Java学院整理

    主要介绍了Spring MVC之DispatcherServlet_动力节点Java学院整理的相关资料,需要的朋友可以参考下

    浅谈springmvc的DispatcherServlet分析

    本篇文章主要介绍了浅谈springmvc的DispatcherServlet分析,小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧

    详解在spring boot中配置多个DispatcherServlet

    本篇文章主要介绍了详解在spring boot中配置多个DispatcherServlet,具有一定的参考价值,有兴趣的可以了解一下。

Global site tag (gtag.js) - Google Analytics