-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathssm3-springmvc_xml.template
executable file
·28 lines (23 loc) · 1.41 KB
/
ssm3-springmvc_xml.template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?xml version="1.0" encoding="UTF-8"?>
<!-- @Created with Atom -->
<!-- @author @author@ -->
<!-- @time @now@ -->
<!-- @description -->
<!-- classpath:ssm3/springmvc.xml -->
<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/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.3.xsd
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.3.xsd">
<!--1、默认就是包含所有 -->
<context:component-scan base-package="com.sd.packagename.controller" use-default-filters="false">
<context:include-filter type="annotation" expression="org.springframework.stereotype.Controller" />
</context:component-scan>
<!--2、视图解析器 -->
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/jsps/" />
<property name="suffix" value=".jsp" />
</bean>
<!-- 映射动态资源,并开启开挂模式 -->
<mvc:annotation-driven />
<!-- 映射静态资源,将静态资源交给tomcat -->
<mvc:default-servlet-handler />
</beans>