zoukankan      html  css  js  c++  java
  • springservlet.xml文件

    <?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:mvc="http://www.springframework.org/schema/mvc"
        xmlns:p="http://www.springframework.org/schema/p"
        xmlns:context="http://www.springframework.org/schema/context"
        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.xsd
            http://www.springframework.org/schema/mvc
            http://www.springframework.org/schema/mvc/spring-mvc.xsd">
    
    </beans>

    解析包(@Controller)

    <mvc:annotation-driven />

    扫描包

    <context:component-scan base-package="/*packagePath*/" />

    配置视图

    <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
            <property name="viewClass" value="org.springframework.web.servlet.view.JstlView"></property>
            <property name="prefix" value="/WEB-INF/pages/" />
            <property name="suffix" value=".jsp" />
    </bean>

    设置上传文件大小

    <bean id="multiPartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver" >
            <property name="maxUploadSize" value="5000000" />
    </bean>
  • 相关阅读:
    iOS开发官方文档汇总
    Hadoop安装配置手册
    访问.Net程序集、COM和WMI
    UML用例图教程详解
    JIRA的详细安装和破解
    [转]编程经典好书分类
    走向资深架构师的旅程
    12款响应式 Lightbox(灯箱)效果插件
    ASP.NET MVC应用程序的安全性介绍总括
    MapReduce篇之InputFormat
  • 原文地址:https://www.cnblogs.com/cmelody/p/6478350.html
Copyright © 2011-2022 走看看