网站跳转逻辑的配置,让其只扫描控制器
<!--SpringMVC的配置文件,包含往回走哪个跳转逻辑控制,配置-->
<context:component-scan base-package="ssm.crud" use-default-filters="false">
<!--只扫描控制器-->
<context:include-filter type="annotation" expression="org.springframework.stereotype.Controller"></context:include-filter>
</context:component-scan>
视图解析器配置,指定扫描的路径和文件
<!--配置视图解析器,方便页面返回-->
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/views/"></property>
<property name="suffix" value=".jsp"></property>
</bean>
两个SpringMVC的标准配置
<!--两个标准配置-->
<!--将springmvc不能处理的请求交给tomcat-->
<mvc:default-servlet-handler/>
<!--能支持springmvc更高级的一些功能,JSR303校验,快捷的ajax...映射动态请求-->
<mvc:annotation-driven/>