mvc-dispatcher-servlet.xml 1.2 KB

12345678910111213141516171819202122
  1. <beans xmlns="http://www.springframework.org/schema/beans"
  2. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mvc="http://www.springframework.org/schema/mvc"
  3. xmlns:context="http://www.springframework.org/schema/context"
  4. xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
  5. xsi:schemaLocation="http://www.springframework.org/schema/beans
  6. http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
  7. http://www.springframework.org/schema/mvc
  8. http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd
  9. http://www.springframework.org/schema/context
  10. http://www.springframework.org/schema/context/spring-context-3.2.xsd
  11. http://www.springframework.org/schema/aop
  12. http://www.springframework.org/schema/aop/spring-aop-3.2.xsd
  13. http://www.springframework.org/schema/tx
  14. http://www.springframework.org/schema/tx/spring-tx-3.2.xsd ">
  15. <!-- 组件扫描器扫描这一层组要扫描处理器 -->
  16. <context:component-scan base-package="com.controller"></context:component-scan>
  17. <!-- 配置注解的映射器和适配器以及其他配置 -->
  18. <mvc:annotation-driven></mvc:annotation-driven>
  19. <!-- 处理静态资源问题 -->
  20. <mvc:default-servlet-handler />
  21. </beans>