springmvc配置文件
来源:互联网 发布:ubuntu flash命令行 编辑:程序博客网 时间:2024/05/17 05:05
<?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:tx="http://www.springframework.org/schema/tx"
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-3.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd">
<!-- 自动扫描的包名 -->
<context:component-scan base-package="com.controller"></context:component-scan>
<!-- 默认的注解映射的支持 -->
<mvc:annotation-driven />
<!-- 视图解释类 -->
<bean
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/" />
<property name="suffix" value="" /><!--可为空,方便实现自已的依据扩展名来选择视图解释类的逻辑 -->
<property name="viewClass"
value="org.springframework.web.servlet.view.JstlView" />
</bean>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tx="http://www.springframework.org/schema/tx"
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-3.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd">
<!-- 自动扫描的包名 -->
<context:component-scan base-package="com.controller"></context:component-scan>
<!-- 默认的注解映射的支持 -->
<mvc:annotation-driven />
<!-- 视图解释类 -->
<bean
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/" />
<property name="suffix" value="" /><!--可为空,方便实现自已的依据扩展名来选择视图解释类的逻辑 -->
<property name="viewClass"
value="org.springframework.web.servlet.view.JstlView" />
</bean>
</beans>
若不在web.xml中配置名字及路径则文件名为:springMVC-servlet.xml
默认路径在WEB-INF根目录下
阅读全文
0 0
- SpringMVC配置文件
- SpringMVC配置文件
- springMvc配置文件
- SpringMVC配置文件
- SpringMVC配置文件
- springmvc配置文件
- springMVC配置文件
- SpringMVC 配置文件
- springmvc配置文件
- springMVC配置文件
- SpringMVC配置文件
- SpringMVC 配置文件
- springmvc 配置文件
- SpringMvc 配置文件
- springmvc配置文件
- SpringMVC 配置文件
- SpringMVC配置文件
- springmvc配置文件
- 学习计算机视觉资源
- 如何查看本机的外网IP
- 网页编程--JavaScript之表单校验
- Java基础之集合框架--Arrays工具类(专门操作数组的工具类)
- (四)-对象内存的分配策略
- springmvc配置文件
- leetcodehard 模式专杀之85. Maximal Rectangle
- JS——面向对象高级
- 线程的生命周期和状态控制
- SpringBoot全局异常捕捉
- redis总结
- 深入理解java异常处理机制
- sleep()与wait()的区别
- 简单的顺序表,及其5大功能的实现!!!