<mvc:annotation-driven/>

  在spring的spring-mvc.xml配置文件中配置,用于启动注解驱动的Spring MVC功能,注册请求url和注解POJO类方法的映射,即作用域@RequestMapping,不配置的话请求的url和controller中的方法没有进行映射,会出现找不到相应的请求路径问题:

WARNING: No mapping found for HTTP request with URI [/springhibernate/employee/list] in DispatcherServlet with name 'spring'

 

<context:annotation-config/>

  这个经常在spring容器中使用,用于开启注解,不过在有<context:compont-scan/>在时可以不要

相关文章:

  • 2022-12-23
  • 2021-05-01
  • 2021-12-10
  • 2022-12-23
  • 2021-12-03
  • 2021-09-22
  • 2021-10-30
猜你喜欢
  • 2021-08-05
  • 2022-12-23
  • 2021-05-26
  • 2021-12-11
  • 2021-10-04
  • 2021-10-02
相关资源
相似解决方案