資源簡介
java的ssh框架,下載后導入,把sql導入到數據庫后,程序是可以跑起來的

代碼片段和文件信息
package?com.lhq.prj.bms.action;
import?java.io.File;
import?java.io.IOException;
import?java.util.ArrayList;
import?java.util.List;
import?com.lhq.prj.bms.core.baseAction;
import?com.lhq.prj.bms.core.MyUtils;
import?com.lhq.prj.bms.core.Page;
import?com.lhq.prj.bms.po.Book;
import?com.lhq.prj.bms.service.IBookService;
/**
?*?BookAction.java?Create?on?2008-9-24?下午09:18:34
?*?
?*?圖書管理
?*?
?*?Copyright?(c)?2008?by?MTA.
?*?
?*?@author?廖瀚卿
?*?@version?1.0
?*/
@SuppressWarnings(“serial“)
public?class?BookAction?extends?baseAction?{
private?IBookService?bookService;
private?Book?book;
private?boolean?success;
private?Page?page;
private?Integer?bookId;
private?File?upload;//?上傳的文件
private?String?uploadContentType;//?上傳問文件類型
private?String?uploadFileName;?//?上傳文件名
private?String?allowedTypes;//?允許上傳的文件類型列表
private?String?savePath;//?文件保存路徑通過ioc注入
private?float?maxHeightSize;//?縮略圖最大高度
private?float?maxWidthSize;//縮略圖最大寬度
private?String?bookName;
private?String?author;
private?String?press;
private?String?price;
private?String?editionNo;
private?String?isbn;
private?Integer?categoryId;
private?String?categoryName;
private?String?wordCount;
private?String?pageCount;
private?String?bookSize;
private?String?paper;
private?String?pack;
private?String?imageUrl;
private?String?address;
private?String?editorRecommend;
private?String?description;
private?String?authorDesc;
private?Integer?state;
/**
?*?添加圖書
?*?
?*?@return
?*/
public?String?saveBook()?{
book?=?this.upload(book);
bookId?=?(Integer)?bookService.saveBook(book);
if?(bookId?!=?null)?{
this.jsonString?=?“{bookId:“?+?bookId?+?“success:trueimageUrl:‘“?+?book.getImageUrl()?+?“‘}“;
getRequest().setAttribute(“jsonString“?jsonString);
return?SUCCESS;
}
this.jsonString?=?“{success:falsecontentTypeIsValid:“?+?MyUtils.isValid(getUploadContentType()?getAllowedTypes().split(““))?+?“}“;
getRequest().setAttribute(“jsonString“?jsonString);
return?INPUT;
}
/**
?*?查找圖書信息
?*?
?*?@return
?*/
public?String?findAllBook()?{
String?strCondition?=?getRequest().getParameter(“conditions“);
List?conditions?=?new?ArrayList();
MyUtils.addToCollection(conditions?MyUtils.split(strCondition?“?“));
page?=?new?Page();
page.setConditions(conditions);
int?start?=?Integer.valueOf(getRequest().getParameter(“start“));
int?limit?=?Integer.valueOf(getRequest().getParameter(“limit“));
page.setStart(++start);
page.setLimit(limit?=?limit?==?0???20?:?limit);
page?=?bookService.findByPage(page);
return?SUCCESS;
}
/**
?*?刪除圖書
?*?
?*?@return
?*/
public?String?deleteBook()?{
String?strBookId?=?getRequest().getParameter(“bookId“);
if?(strBookId?!=?null?&&?!““.equals(strBookId))?{
success?=?bookService.deleteBook(getSession().getServletContext().getRealPath(“/“)?Integer
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2016-04-28?21:12??圖書管理系統(struts+hibernate+spring+ext)\
?????目錄???????????0??2016-04-29?11:33??圖書管理系統(struts+hibernate+spring+ext)\bmsh\
?????文件????????1721??2008-10-09?20:27??圖書管理系統(struts+hibernate+spring+ext)\bmsh\.classpath
?????目錄???????????0??2016-04-29?11:49??圖書管理系統(struts+hibernate+spring+ext)\bmsh\.myeclipse\
?????文件?????????286??2008-10-09?20:27??圖書管理系統(struts+hibernate+spring+ext)\bmsh\.myme
?????文件??????????66??2008-09-07?21:47??圖書管理系統(struts+hibernate+spring+ext)\bmsh\.myumldata
?????文件????????1410??2008-09-13?00:15??圖書管理系統(struts+hibernate+spring+ext)\bmsh\.project
?????目錄???????????0??2016-04-29?11:33??圖書管理系統(struts+hibernate+spring+ext)\bmsh\.settings\
?????文件?????????406??2008-09-13?00:15??圖書管理系統(struts+hibernate+spring+ext)\bmsh\.settings\.jsdtscope
?????文件????????1040??2008-09-16?10:08??圖書管理系統(struts+hibernate+spring+ext)\bmsh\.settings\com.genuitec.eclipse.j2eedt.core.prefs
?????文件??????????86??2008-09-16?21:21??圖書管理系統(struts+hibernate+spring+ext)\bmsh\.settings\org.eclipse.core.resources.prefs
?????文件?????????162??2008-09-16?10:08??圖書管理系統(struts+hibernate+spring+ext)\bmsh\.settings\org.eclipse.jdt.ui.prefs
?????文件??????????49??2008-09-13?00:15??圖書管理系統(struts+hibernate+spring+ext)\bmsh\.settings\org.eclipse.wst.jsdt.ui.superType.container
?????文件???????????6??2008-09-13?00:15??圖書管理系統(struts+hibernate+spring+ext)\bmsh\.settings\org.eclipse.wst.jsdt.ui.superType.name
?????目錄???????????0??2016-04-29?11:33??圖書管理系統(struts+hibernate+spring+ext)\bmsh\WebRoot\
?????目錄???????????0??2008-10-13?09:06??圖書管理系統(struts+hibernate+spring+ext)\bmsh\WebRoot\me
?????文件??????????39??2008-09-06?10:37??圖書管理系統(struts+hibernate+spring+ext)\bmsh\WebRoot\me
?????目錄???????????0??2016-04-29?11:33??圖書管理系統(struts+hibernate+spring+ext)\bmsh\WebRoot\WEB-INF\
?????目錄???????????0??2016-04-29?11:33??圖書管理系統(struts+hibernate+spring+ext)\bmsh\WebRoot\WEB-INF\classes\
?????文件?????????874??2008-10-11?20:34??圖書管理系統(struts+hibernate+spring+ext)\bmsh\WebRoot\WEB-INF\classes\SqlMapConfig.xm
?????文件????????1886??2008-10-11?19:25??圖書管理系統(struts+hibernate+spring+ext)\bmsh\WebRoot\WEB-INF\classes\applicationContext-actions.xm
?????文件????????2080??2008-09-16?10:15??圖書管理系統(struts+hibernate+spring+ext)\bmsh\WebRoot\WEB-INF\classes\applicationContext-common.xm
?????文件????????1684??2008-10-11?19:44??圖書管理系統(struts+hibernate+spring+ext)\bmsh\WebRoot\WEB-INF\classes\applicationContext-daos.xm
?????文件????????1821??2008-10-12?15:56??圖書管理系統(struts+hibernate+spring+ext)\bmsh\WebRoot\WEB-INF\classes\applicationContext-services.xm
?????目錄???????????0??2008-11-12?11:51??圖書管理系統(struts+hibernate+spring+ext)\bmsh\WebRoot\WEB-INF\classes\com\
?????目錄???????????0??2008-11-12?11:51??圖書管理系統(struts+hibernate+spring+ext)\bmsh\WebRoot\WEB-INF\classes\com\lhq\
?????目錄???????????0??2008-11-12?11:51??圖書管理系統(struts+hibernate+spring+ext)\bmsh\WebRoot\WEB-INF\classes\com\lhq\prj\
?????目錄???????????0??2008-11-12?11:51??圖書管理系統(struts+hibernate+spring+ext)\bmsh\WebRoot\WEB-INF\classes\com\lhq\prj\bms\
?????目錄???????????0??2016-04-29?11:33??圖書管理系統(struts+hibernate+spring+ext)\bmsh\WebRoot\WEB-INF\classes\com\lhq\prj\bms\action\
?????文件???????11379??2008-11-12?11:51??圖書管理系統(struts+hibernate+spring+ext)\bmsh\WebRoot\WEB-INF\classes\com\lhq\prj\bms\action\BookAction.class
?????文件????????4430??2008-11-12?11:51??圖書管理系統(struts+hibernate+spring+ext)\bmsh\WebRoot\WEB-INF\classes\com\lhq\prj\bms\action\CategoryAction.class
............此處省略588個文件信息
評論
共有 條評論