From 953cbbf76091fee9d40045f91c06daee496fe5b3 Mon Sep 17 00:00:00 2001
From: yzt <Xynz17@163.com>
Date: 星期五, 05 五月 2023 12:24:50 +0800
Subject: [PATCH] Merge branch 'master' of http://47.108.70.204:60062/r/~zhitong.yu/bs/version

---
 src/main/resources/spring-mvc.xml |   55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 55 insertions(+), 0 deletions(-)

diff --git a/src/main/resources/spring-mvc.xml b/src/main/resources/spring-mvc.xml
new file mode 100644
index 0000000..a3b7586
--- /dev/null
+++ b/src/main/resources/spring-mvc.xml
@@ -0,0 +1,55 @@
+<?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"
+       xmlns:aop="http://www.springframework.org/schema/aop"
+       xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd
+		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
+		http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
+		http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd">
+
+    <!-- 鑷姩鎵弿涓斿彧鎵弿@Controller -->
+    <context:component-scan base-package="com.hxzkoa.controller" use-default-filters="false">
+        <context:include-filter type="annotation" expression="org.springframework.stereotype.Controller"/>
+    </context:component-scan>
+
+	<mvc:annotation-driven>
+		<mvc:message-converters register-defaults="true">
+			<bean id="jsonConverter" class="org.springframework.http.converter.json.MappingJacksonHttpMessageConverter">
+				<property name="supportedMediaTypes" value="text/html;charset=UTF-8" />
+			</bean>
+		</mvc:message-converters>
+	</mvc:annotation-driven> 
+    <aop:aspectj-autoproxy/>
+    <!-- 灏嗘棤娉昺apping鍒癈ontroller鐨刾ath浜ょ粰default servlet handler澶勭悊 -->
+    <!-- <mvc:default-servlet-handler/> -->
+    <mvc:resources mapping="/static/**" location="/static/"/>
+
+    <!-- 瀹氫箟JSP鏂囦欢鐨勪綅缃� -->
+    <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
+        <property name="prefix" value="/WEB-INF/"/>
+        <property name="suffix" value=".jsp"/>
+    </bean>
+
+    <!-- 涓婁紶file-->
+    <bean id="multipartResolver"
+          class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
+          <!--resolveLazily灞炴�у惎鐢ㄦ槸涓轰簡鎺ㄨ繜鏂囦欢瑙f瀽锛屼互渚垮湪UploadAction 涓崟鑾锋枃浠跺ぇ灏忓紓甯�--> 
+        <property name="resolveLazily" value="true"/>
+        <!-- one of the properties available; the maximum file size in bytes -->
+        <property name="maxUploadSize">
+      <!--   鏈�澶�2M -->
+            <value>15728640</value>
+            <!-- 璁剧疆涓婁紶鏂囦欢澶у皬 -1 涓轰笉闄愬埗澶у皬 -->
+        </property>
+        <property name="maxInMemorySize">
+            <value>15728640</value>
+        </property>
+        <property name="defaultEncoding">
+            <value>UTF-8</value>
+            <!-- 璁剧疆涓婁紶鏃剁殑缂栫爜 -->
+        </property>
+    </bean>
+
+</beans>

--
Gitblit v1.10.0