資源簡介
家教平臺管理系統采用SSH框架搭建,數據庫為mysql,編碼比較規范合理,內附整套程序的代碼講解視頻,如果看不明白的可以結合視頻去學習,比較適合學生下載下來作為畢業設計或者課程設計
代碼片段和文件信息
package?com.action;
import?java.util.ArrayList;
import?java.util.Calendar;
import?java.util.Date;
import?java.util.List;
import?javax.servlet.http.HttpServletRequest;
import?org.apache.commons.lang.StringUtils;
import?org.apache.log4j.Logger;
import?org.apache.struts2.ServletActionContext;
import?com.common.Constants;
import?com.common.PageBean;
import?com.service.LingService;
import?com.service.NewsService;
import?com.service.XunService;
import?com.vo.Ling;
import?com.vo.News;
import?com.vo.Xun;
import?com.opensymphony.xwork2.ActionSupport;
public?class?IndexWebAction?extends?ActionSupport?{
/**
?*?Service層實例
?*/
private?NewsService?newsService;
private?LingService?lingService;
private?XunService?xunService;
/**
?*?日志
?*/
private?Logger?log?=?Logger.getLogger(this.getClass());
private?Long?id;
@SuppressWarnings(“unchecked“)
public?String?queryIndex()?{
log.debug(“queryGoods“?+?“開始“);
HttpServletRequest?request?=?ServletActionContext.getRequest();
initSelect(request);
List?list?=?newsService.getAllNews();
request.setAttribute(“newsList“?list);//將獲得的list變量值?set到前臺,?newsList
List?listxun?=?xunService.getAllXun();
if(listxun==null){
listxun=new?ArrayList();
}
if?(listxun!=null&&listxun.size()?>=?10)?{
request.setAttribute(“xunList“?listxun.subList(0?8));
}?else?{
request.setAttribute(“xunList“?listxun);
}
List?listling?=?lingService.getAllLing();
if(listling==null){
listling=new?ArrayList();
}
if?(listling!=null&&listling.size()?>=?10)?{
request.setAttribute(“lingList“?listling.subList(0?8));
}?else?{
request.setAttribute(“lingList“?listling);
}
log.debug(“queryGoods“?+?“結束“);
return?“index“;
}
public?NewsService?getNewsService()?{
return?newsService;
}
public?void?setNewsService(NewsService?newsService)?{
this.newsService?=?newsService;
}
public?LingService?getLingService()?{
return?lingService;
}
public?void?setLingService(LingService?lingService)?{
this.lingService?=?lingService;
}
public?XunService?getXunService()?{
return?xunService;
}
public?void?setXunService(XunService?xunService)?{
this.xunService?=?xunService;
}
public?void?initSelect(HttpServletRequest?request)?{
}
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2016-06-06?21:21??jjpt\
?????文件????????5763??2016-06-06?21:21??jjpt\.classpath
?????目錄???????????0??2016-06-07?13:59??jjpt\.myeclipse\
?????文件?????????286??2016-06-06?21:21??jjpt\.myme
?????文件????????1277??2016-06-06?21:21??jjpt\.project
?????目錄???????????0??2016-06-06?21:21??jjpt\.settings\
?????文件????????1040??2016-06-06?21:21??jjpt\.settings\com.genuitec.eclipse.j2eedt.core.prefs
?????文件??????????88??2016-06-06?21:21??jjpt\.settings\org.eclipse.core.resources.prefs
?????目錄???????????0??2016-06-06?21:21??jjpt\WebRoot\
?????目錄???????????0??2016-06-06?21:21??jjpt\WebRoot\me
?????文件??????????39??2016-06-06?21:21??jjpt\WebRoot\me
?????目錄???????????0??2016-06-06?21:21??jjpt\WebRoot\WEB-INF\
?????目錄???????????0??2016-06-06?21:21??jjpt\WebRoot\WEB-INF\classes\
?????文件???????15867??2016-06-06?21:21??jjpt\WebRoot\WEB-INF\classes\.struts.mex
?????目錄???????????0??2016-06-06?21:21??jjpt\WebRoot\WEB-INF\classes\com\
?????目錄???????????0??2016-06-06?21:21??jjpt\WebRoot\WEB-INF\classes\com\action\
?????文件????????2933??2016-06-06?21:21??jjpt\WebRoot\WEB-INF\classes\com\action\IndexWebAction.class
?????文件????????7275??2016-06-06?21:21??jjpt\WebRoot\WEB-INF\classes\com\action\LingWebAction.class
?????文件????????6997??2016-06-06?21:21??jjpt\WebRoot\WEB-INF\classes\com\action\LoginuserWebAction.class
?????文件????????5800??2016-06-06?21:21??jjpt\WebRoot\WEB-INF\classes\com\action\MessageWebAction.class
?????文件????????5016??2016-06-06?21:21??jjpt\WebRoot\WEB-INF\classes\com\action\NewsWebAction.class
?????文件????????4488??2016-06-06?21:21??jjpt\WebRoot\WEB-INF\classes\com\action\PingWebAction.class
?????文件????????6883??2016-06-06?21:21??jjpt\WebRoot\WEB-INF\classes\com\action\UserinfoWebAction.class
?????文件????????7237??2016-06-06?21:21??jjpt\WebRoot\WEB-INF\classes\com\action\XunWebAction.class
?????目錄???????????0??2016-06-06?21:21??jjpt\WebRoot\WEB-INF\classes\com\common\
?????文件????????6687??2016-06-06?21:21??jjpt\WebRoot\WEB-INF\classes\com\common\AnnotationSessionFactoryBeanEx.class
?????文件?????????676??2016-06-06?21:21??jjpt\WebRoot\WEB-INF\classes\com\common\Constants.class
?????文件?????????901??2016-06-06?21:21??jjpt\WebRoot\WEB-INF\classes\com\common\DataSource.class
?????文件????????1346??2016-06-06?21:21??jjpt\WebRoot\WEB-INF\classes\com\common\DateUtils.class
?????文件????????1948??2016-06-06?21:21??jjpt\WebRoot\WEB-INF\classes\com\common\GenericsUtils.class
?????文件???????20093??2016-06-06?21:21??jjpt\WebRoot\WEB-INF\classes\com\common\HibernateGenericDao.class
............此處省略903個文件信息
- 上一篇:64位WIN7SQLServer連接DBF文件
- 下一篇:視頻app+后臺附帶教程
評論
共有 條評論