栏目分类:
子分类:
返回
终身学习网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
终身学习网 > IT > 软件开发 > 后端开发 > Java

多文件上传与下载

Java 更新时间:发布时间: 百科书网 趣学号
第一步:导入依赖包



    4.0.0
    com.example
    1.0
    SpringMVCDemo
     war
    
        UTF-8
        1.8
        1.8
    

    
        
            org.springframework
            spring-web
            5.2.8.RELEASE
        
        
            com.baomidou
            mybatis-plus-boot-starter
            3.4.2
        
        
            mysql
            mysql-connector-java
            8.0.25
            runtime
        
        
            org.springframework
            spring-webmvc
            5.2.8.RELEASE
        
        
            javax.servlet.jsp
            jsp-api
            2.0
             compile     
        
       

        
            javax.servlet
            javax.servlet-api
            3.0.1
            compile

        

        
            junit
            junit
            4.13
            test
        
        
            org.projectlombok
            lombok
            RELEASE
            compile
        
        
            org.junit.jupiter
            junit-jupiter
            RELEASE
            compile
        

        
            com.alibaba
            druid
            1.2.6
        
        
            org.slf4j
            slf4j-log4j12
            1.7.25
        

        
            com.fasterxml.jackson.core
            jackson-core
           2.11.1
        
        
            com.fasterxml.jackson.core
            jackson-annotations
            2.11.1
        
        
            com.fasterxml.jackson.core
            jackson-databind
            2.11.1
        
       
        
            commons-io
            commons-io
            2.4
        

        
            commons-fileupload
            commons-fileupload
            1.2.2
        

        
        
            jstl
            jstl
            1.1.2
        
        
            taglibs
            standard
            1.1.2
        
    
    
        SpringMVCDemo
        
            
                
                    maven-clean-plugin
                    3.1.0
                
                
                
                    maven-resources-plugin
                    3.0.2
                
                
                    maven-compiler-plugin
                    3.8.0
                
                
                    maven-surefire-plugin
                    2.22.1
                
                
                    maven-war-plugin
                    3.2.2
                
                
                    maven-install-plugin
                    2.5.2
                
                
                    maven-deploy-plugin
                    2.8.2
                
            
        
    

第二步:配置MultipartResolver web.xml



  
  
    contextConfigLocation
    classpath:applicationContext.xml
  
  
  
    org.springframework.web.context.ContextLoaderListener
  
  
  
  
    
    quickstart
    
      org.springframework.web.servlet.DispatcherServlet
    
    
    
      contextConfigLocation
      classpath:spring-mvc.xml
    
    1
  
  
    quickstart
    
文件下载


成功后



最后在电脑中的下载查看

转载请注明:文章转载自 www.051e.com
本文地址:http://www.051e.com/it/294488.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 ©2023-2025 051e.com

ICP备案号:京ICP备12030808号