资源简介
旅游管理项目,采用了ssm框架,实现了对旅游项目的管理,前后端分离,采用3层的架构。

代码片段和文件信息
package cn.tedu.ttms.attachement.controller;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.List;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
import cn.tedu.ttms.attachement.entity.Attachement;
import cn.tedu.ttms.attachement.service.AttachementService;
import cn.tedu.ttms.common.web.JsonResult;
@Controller
@RequestMapping(“/attach“)
public class AttachementController {
@Resource
private AttachementService attachementService;
@RequestMapping(“/uploadUI“)
public String uploadUI(){
return “attachement/attachement“;
}
@RequestMapping(“/doSaveobject“)
@ResponseBody
public JsonResult doSaveobject(
String title
Integer athType
Integer belongId
MultipartFile mFile
HttpServletRequest request){//
//http://localhost:8080/ttms2.0/....
String serverPath=
request.getServletContext()
.getRealPath(“/“);
System.out.println(“realPath=“+serverPath);
attachementService.saveobject(
titleathTypebelongId
mFileserverPath);
return new JsonResult();
}
@RequestMapping(“/doFindobjects“)
@ResponseBody
public JsonResult doFindobjects(){
List list=
attachementService.findobjects();
return new JsonResult(list);
}
@RequestMapping(“/doDownload“)
@ResponseBody
public byte[] doDownload(Integer id
HttpServletResponse response)throws IOException{
File file=
attachementService.findobjectById(id);
//设置响应消息头(下载时的固定写法)
response.setContentType(
“appliction/octet-stream“);
response.setHeader(
“Content-disposition“
“attachment;filename=“+file.getName());
//根据文件真实路径构建一个Path对象
Path path=Paths.get(file.getPath());
//将文件的字节返回(spring mvc 会自动将这字节写入到文件)
return Files.readAllBytes(path);
//return file;
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1658 2017-07-24 10:29 ttms4.0\.classpath
文件 1216 2017-07-24 10:24 ttms4.0\.project
文件 639 2017-07-24 10:23 ttms4.0\.settings\.jsdtscope
文件 57 2017-07-24 10:29 ttms4.0\.settings\org.eclipse.core.resources.prefs
文件 736 2017-07-24 10:29 ttms4.0\.settings\org.eclipse.jdt.core.prefs
文件 90 2017-07-24 10:23 ttms4.0\.settings\org.eclipse.m2e.core.prefs
文件 662 2017-07-24 10:23 ttms4.0\.settings\org.eclipse.wst.common.component
文件 252 2017-07-24 10:29 ttms4.0\.settings\org.eclipse.wst.common.project.facet.core.xm
文件 49 2017-07-24 10:23 ttms4.0\.settings\org.eclipse.wst.jsdt.ui.superType.container
文件 6 2017-07-24 10:23 ttms4.0\.settings\org.eclipse.wst.jsdt.ui.superType.name
文件 50 2017-07-24 10:23 ttms4.0\.settings\org.eclipse.wst.validation.prefs
文件 3 2017-07-24 10:23 ttms4.0\.svn\entries
文件 3 2017-07-24 10:23 ttms4.0\.svn\format
文件 584 2017-07-24 11:20 ttms4.0\.svn\pristine\00\004cf9acfa9a80a46fd4625d959353b64bc930ac.svn-ba
文件 430 2017-07-24 10:23 ttms4.0\.svn\pristine\01\01e1c466a5646cb9a6d6df069514558e54ed997f.svn-ba
文件 134808 2017-07-24 10:35 ttms4.0\.svn\pristine\04\048707bc52ac4b6563aaa383bfe8660a0ddc908c.svn-ba
文件 3297 2017-07-24 11:20 ttms4.0\.svn\pristine\07\073dbfab3ec3f02da0b000c327b1212c6442f37a.svn-ba
文件 576 2017-07-24 10:35 ttms4.0\.svn\pristine\07\073e909921a1a5dc53fd2f0790318186d5d8e39d.svn-ba
文件 252 2017-07-24 10:23 ttms4.0\.svn\pristine\07\07f3fa47d24dd77ce5956a59fd390f39948ca4a5.svn-ba
文件 122540 2017-07-24 10:35 ttms4.0\.svn\pristine\08\08df9a96752852f2cbd310c30facd934e348c2c5.svn-ba
文件 881 2017-07-24 10:35 ttms4.0\.svn\pristine\0c\0c5a01229a1e6544eaa7d281de5de5b67d28820e.svn-ba
文件 1777 2017-07-24 10:35 ttms4.0\.svn\pristine\0c\0cf227d101268fa6b0111ef391128f21bcdae855.svn-ba
文件 5283 2017-07-24 10:35 ttms4.0\.svn\pristine\0d\0d0deec9e92817f65a695bcb0a02e7b828a2dfa6.svn-ba
文件 2825 2017-07-24 10:35 ttms4.0\.svn\pristine\0d\0de0fa604ca310aabc0c71748bfa56e64d730b28.svn-ba
文件 2739 2017-07-24 10:35 ttms4.0\.svn\pristine\0f\0f5424989e651368d80b60af27c8aaad5ea9abf5.svn-ba
文件 1341 2017-07-24 10:35 ttms4.0\.svn\pristine\0f\0ffefff338257b636609a0d01221c95972010d96.svn-ba
文件 86659 2017-07-24 10:35 ttms4.0\.svn\pristine\10\1055018c28ab41087ef9ccefe411606893dabea2.svn-ba
文件 302 2017-07-24 10:35 ttms4.0\.svn\pristine\11\112ad274eb4a0d5205859c23bc95aeb571410a27.svn-ba
文件 1982 2017-07-24 11:20 ttms4.0\.svn\pristine\13\13458066db62ca7e4a2a2815452964bd87956ca4.svn-ba
文件 165548 2017-07-24 10:35 ttms4.0\.svn\pristine\13\13b1eab65a983c7a73bc7997c479d66943f7c6cb.svn-ba
............此处省略801个文件信息
- 上一篇:opencv车牌识别系统可直接运行
- 下一篇:天天生鲜购物商城系统
相关资源
- SpringBoot+H2+mybatis-plus59130
- mybatis连接oracle实例
- 基于SSM+CXF构建的RESTFul webservice
- Spring+MyBatis企业应用实战第一二版的源
- springboot+mybatis整合实现注册登录
- 基于web的图书馆运营系统
- MyBatis plugin 3.155 (最新版)
- MyBatis 3.4.7 中文帮助文档(CHM)
- mybatis3-api.chm
- SpringBoot+Mybatis+前后台隔离技术,完整
- Spring+Struts2+Mybatis的一个增删改查的
- 使用MybatisPlus+SpringMBVC完成的CUID以及分
- springmvc+mybatis点餐系统(包含完整数据
- springmvc+Mybatis+axis2+webservice+quartz作业整
- 基于yml 配置方式 ,实现springBoot+sha
- spring+struts2+mybatis三大框架集成实现用
- springboot+mybatis+layui
- springmvc_2020.rar
- 基于SSM的校社联社团管理系统SpringM
- springboot+mybatis后台vue.js实现前端的音
- Mybatis从入门到精通(源码)
- Mybatis的代码
- mybatis-3.3.0.zip
- MyEclipse MyBatis Generatorl离线安装包
- MyBatis Generator自定义插件实现自定义
- mybatis-generator-1.3.5源码修改.zip
- 基于SSM的个人博客系统的设计与实现
- springboot整合mybatis+plus+avtiveMq+redis
- Mybatis数据库的基本应用
- 智能排班系统Spring+SpringMVC+MyBatis+Pat
评论
共有 条评论