dispatcherServlet-servlet.xml(SSM maven 项目)
2024-10-20 05:39:14
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd"> <!--SpringMVC的配置文件,包含网站跳转逻辑的控制 、 配置 默认规则 use-default-filters=" false" -->
<context:component-scan base-package="xyz.sun" use-default-filters="false">
<!--只扫描控制器 所有标有Controller 注解的都是控制器-->
<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不能处理的请求交给tomcat-->
<mvc:default-servlet-handler />
<!-- 能支持springmvc 更高级的一些功能 JSR303校验 快捷Ajax请求 映射动态请求 -->
<mvc:annotation-driven /> </beans>
最新文章
- RabbitMQ框架学写笔记-20161201
- Java设计模式学习笔记(观察者模式)
- 剑指Offer32 丑数
- C#轻型ORM框架PetaPoco试水
- 【转载】解析提高PHP执行效率的50个技巧
- 找回丢失的SQL Server性能计数器
- Starting the application on Mac does not work(拷贝platforms到不同的位置,才能解决问题),还可设置DYLD_PRINT_LIBRARIES=1 观察动态库
- Mac下如何使用Vim
- UIImageView帧动画相关属性和方法
- NDK开发过程自认为好的一些参考资料
- c#使用 Newtonsoft.Json 将entity转json时,忽略为null的属性
- [UE4]快速移动,给单位向量加一个力
- bash中的pasue
- Hadoop序列化-流量汇总案例
- Leetcode 999. 车的可用捕获量
- ONVIF让NVR与网络监控摄像机更";亲密";
- 深入理解Java Callable接口
- UNIX环境编程学习笔记(20)——进程管理之exec 函数族
- eclipse下编译cocos2dx 3.0
- fm 讲解加代码