You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
2.5 KiB
53 lines
2.5 KiB
9 months ago
|
<beans xmlns="http://www.springframework.org/schema/beans"
|
||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||
|
xmlns:p="http://www.springframework.org/schema/p"
|
||
|
xmlns:c="http://www.springframework.org/schema/c"
|
||
|
xmlns:util="http://www.springframework.org/schema/util"
|
||
|
xmlns:context="http://www.springframework.org/schema/context"
|
||
|
xmlns:aop="http://www.springframework.org/schema/aop"
|
||
|
xmlns:tx="http://www.springframework.org/schema/tx"
|
||
|
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/util
|
||
|
http://www.springframework.org/schema/util/spring-util.xsd
|
||
|
http://www.springframework.org/schema/context
|
||
|
http://www.springframework.org/schema/context/spring-context.xsd
|
||
|
http://www.springframework.org/schema/aop
|
||
|
http://www.springframework.org/schema/aop/spring-aop.xsd
|
||
|
http://www.springframework.org/schema/tx
|
||
|
http://www.springframework.org/schema/tx/spring-tx.xsd
|
||
|
http://www.springframework.org/schema/mvc
|
||
|
http://www.springframework.org/schema/mvc/spring-mvc.xsd
|
||
|
">
|
||
|
<!--扫描controller-->
|
||
|
<context:component-scan base-package="com.zhangzeyuan.controller"/>
|
||
|
<!--这里配置三大组件-->
|
||
|
<mvc:annotation-driven/>
|
||
|
|
||
|
<!--配置视图解析器-->
|
||
|
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
|
||
|
<property name="prefix" value="/WEB-INF/view/"></property>
|
||
|
<property name="suffix" value=".jsp"></property>
|
||
|
</bean>
|
||
|
<!--配置静态资源放行-->
|
||
|
<mvc:resources mapping="/js/**" location="/js/"></mvc:resources>
|
||
|
<!--<mvc:resources mapping="/css/**" location="/css/"></mvc:resources>-->
|
||
|
<!--<mvc:resources mapping="/img/**" location="/img/"></mvc:resources>-->
|
||
|
<mvc:resources mapping="/static/**" location="/static/"></mvc:resources>
|
||
|
<mvc:resources mapping="/upload/**" location="/upload/"></mvc:resources>
|
||
|
<!--文件上传解析组件
|
||
|
id必须为multipartResolver
|
||
|
springmvc默认使用该id找该组件
|
||
|
-->
|
||
|
<bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
|
||
|
<property name="defaultEncoding" value="utf-8"></property>
|
||
|
<!--设置文件大小-->
|
||
|
<property name="maxUploadSizePerFile" value="10"></property>
|
||
|
</bean>
|
||
|
|
||
|
</beans>
|
||
|
|
||
|
|