不用注解添加controller时会抛出No adapter for handler异常。

解决方法:在DispatcherServlet的配置文件(***-servlet.xml)中加入如下两行:

<bean class="org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter" />
<bean class="org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter" />

相关文章:

  • 2021-07-20
  • 2022-12-23
  • 2021-10-12
  • 2021-10-29
  • 2021-09-29
猜你喜欢
  • 2021-12-05
  • 2021-11-17
  • 2022-01-13
  • 2022-12-23
  • 2021-05-02
  • 2022-12-23
  • 2021-09-22
相关资源
相似解决方案