SpringMVC xml的配置写法
2016-06-14 11:37
375 查看
<?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-4.1.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.1.xsd"> <context:annotation-config/> <!-- scan the package and the sub package --> <context:component-scan base-package="com.wqdata.test"/> <!-- don't handle the static resource --> <mvc:default-servlet-handler /> <!-- if you use annotation you must configure following setting --> <mvc:annotation-driven /> <!-- configure the InternalResourceViewResolver --> <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver" id="internalResourceViewResolver"> <!-- 前缀 --> <property name="prefix" value="/WEB-INF/jsp/" /> <!-- 后缀 --> <property name="suffix" value=".jsp" /> </bean> </beans>
相关文章推荐
- 在web.xml中配置SpringMVC的启动配置项
- java文件读写操作大全
- SpringMVC返回Json的做法
- javac、java打jar包命令实例
- Eclipse报PermGen space内存不足的解决办法
- 千万不要误用 java 中的 HashCode 方法
- Eclipse 'The default workspace is in use or cannot be created'
- 新手学JAVA(十)-多线程----线程的创建和启动
- spring数据源配置
- struts2 Action向JSP传值方式
- 转:JAVA常见错误处理方法 和 JVM内存结构
- myeclipse、eclipse快捷键
- 转:java.lang.OutOfMemoryError: Java heap space错误及处理办法(收集整理、转)
- Spring源码深度解析(一)Spring的整体架构
- 排序算法java实现
- ADT、SDK、JDK、
- Java Restful 不使用Spring,搭建jersey
- Java多线程下的单例模式参考
- 转:java 可设置最大内存
- Java RMI(2):项目中使用RMI