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

基于SSM的水果商城(免费源码获取+运行指导+论文)

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

基于SSM的水果商城(免费源码获取+运行指导+论文)

使用技术

后端:spring+mybatis+springmvc

前端:jsp+js+css

数据库:mysql

功能模块

管理后台:

  • 管理员登录

  • 用户管理

  • 商品管理

  • 订单管理

  • 公共管理

  • 留言管理

前台用户:

  • 商品查询

  • 商品详情

  • 购物车

  • 结算下单

  • 购买记录

  • 个人中心

  • 登录注册

  • 留言,公告

package com.javapandeng.controller;

import com.javapandeng.utils.SystemContext;
import com.javapandeng.utils.UUIDUtils;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;

import java.io.File;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;


@Controller
@RequestMapping("/ueditor")
public class UeditorController {

    @ResponseBody
    @RequestMapping("/saveFile")
    public Map saveFile(@RequestParam(value="upfile",required = false)MultipartFile file) throws IOException {
        Map params = new HashMap<>();
        String n = UUIDUtils.create();
        String path = SystemContext.getRealPath() + "resource\ueditor\upload\" + n + file.getOriginalFilename();
        File newFile = new File(path);
        //通过CommonsMultipartFile的方法直接写文件
        file.transferTo(newFile);
        String visitUrl = "/resource/ueditor/upload/"+n+file.getOriginalFilename();
        params.put("state","SUCCESS");
        params.put("url",visitUrl);
        params.put("size",file.getSize());
        params.put("original",file.getOriginalFilename());
        params.put("type",file.getContentType());
        return params;
    }
}

 

源码链接me: javahttps://gitee.com/wuyanzua/me#zhouzhoutingya

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

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号