<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:context="http://www.springframework.org/schema/context" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.2.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.2.xsd "> <mvc:annotation-driven></mvc:annotation-driven> <!--/ 斜杠配置 处理静态资源:.css .js .png等 --> <!-- *.do *.d等这样的配置,按照正常显示加载 --> <mvc:default-servlet-handler/> <!--创建对象 --> <context:component-scan base-package="com.*,tcat_sh"></context:component-scan> <mvc:annotation-driven></mvc:annotation-driven> <!--对模型视图名称的解析,即在模型视图名称添加前后缀 --> <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver" > <property name="prefix" value="/"/> <property name="suffix" value=".jsp"/> <!-- <property name="viewClass" value="org.springframework.web.servlet.view.JstlView" /> --> </bean> </beans>