使用技术
后端: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



