当前位置:知之问问>百科知识>smartupload.jar如何 实现进度条

smartupload.jar如何 实现进度条

2023-03-20 17:46:55 编辑:join 浏览量:627

smartupload.jar如何 实现进度条

您好,是这样的:import pojo.User; import dao.HibernateDao; import org.springframework.core.io.*; import java.io.*; public class TestAction { //DAO private HibernateDao hibernateDao; //Resource代表资源 public Resource resource; public HibernateDao getHibernateDao() { return hibernateDao; } public void setHibernateDao(HibernateDao hibernateDao) { this.hibernateDao = hibernateDao; } public Resource getResource() { //模拟资源 这里硬编 return new ClassPathResource("quartz-1.6.4.zip"); } public void setResource(Resource resource) { this.resource = resource; } public String execute() throws IOException { ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); org.springframework.util.FileCopyUtils.copy(getResource() .getInputStream(), byteArrayOutputStream); User user = new User(); user.setByteTest(byteArrayOutputStream.toByteArray()); hibernateDao.save(user); return "success"; } } struts.xml 1.jsp wait.jsp default wait.jsp <%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%> <%@taglib prefix="s" uri="/struts-tags"%> 春森裤"/>

标签:smartupload,jar,进度条

版权声明:文章由 知之问问 整理收集,来源于互联网或者用户投稿,如有侵权,请联系我们,我们会立即处理。如转载请保留本文链接:https://www.zhzhwenwen.com/article/20494.html
热门文章