springmvc.xml
2020-12-13 04:10
标签:org scan tip expr servlet version not ssi let springmvc.xml 标签:org scan tip expr servlet version not ssi let 原文地址:https://www.cnblogs.com/Lcyan/p/11105326.html 1 xml version="1.0" encoding="UTF-8"?>
2 beans xmlns="http://www.springframework.org/schema/beans"
3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4 xmlns:mvc="http://www.springframework.org/schema/mvc"
5 xmlns:context="http://www.springframework.org/schema/context"
6 xmlns:aop="http://www.springframework.org/schema/aop"
7 xmlns:tx="http://www.springframework.org/schema/tx"
8 xsi:schemaLocation="
9 http://www.springframework.org/schema/beans
10 https://www.springframework.org/schema/beans/spring-beans.xsd
11 http://www.springframework.org/schema/mvc
12 https://www.springframework.org/schema/mvc/spring-mvc.xsd
13 http://www.springframework.org/schema/context
14 https://www.springframework.org/schema/context/spring-context.xsd
15 http://www.springframework.org/schema/aop
16 http://www.springframework.org/schema/aop/spring-aop-3.2.xsd
17 http://www.springframework.org/schema/tx
18 http://www.springframework.org/schema/tx/spring-tx-3.2.xsd">
19
20
21 context:component-scan base-package="com.lu">
22 context:include-filter type="annotation" expression="org.springframework.stereotype.Controller"/>
23 context:component-scan>
24
25 bean id="internalResourceViewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
26 property name="prefix" value="/WEB-INF/pages/">property>
27 property name="suffix" value=".jsp">property>
28 bean>
29
30 mvc:resources mapping="/css/**" location="/css/">mvc:resources>
31 mvc:resources mapping="/images/**" location="/images/">mvc:resources>
32 mvc:resources mapping="/js/**" location="/js/">mvc:resources>
33
34 mvc:annotation-driven>
35 mvc:message-converters>
36
37
38 bean class="org.springframework.http.converter.StringHttpMessageConverter">
39 property name="supportedMediaTypes">
40 list>
41 value>application/json;charset=UTF-8value>
42 list>
43 property>
44 bean>
45
46
54 mvc:message-converters>
55 mvc:annotation-driven>
56 mvc:default-servlet-handler/>
57
58 bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
59 property name="maxUploadSize" value="10240000">property>
60 bean>
61 beans>