資源簡介
這是一個Java語言寫的旅游網站,里面有數據庫,導入工程就可以用,有前臺和后臺。這是本人下載的一個電商網站,再一步步改出來的。
如果你需要的就是一個電商網站模板,那恭喜你,將工程導入myeclipse,啟動服務器,在頁面地址欄輸入http://localhost:8080/install/install.do,然后按照頁面提示的安裝步驟一步步的做,后面就出現一個包含了前后臺的頁面鏈接,點進去之后,你就可以把這個電商網站改成你想要的網站了。
如果你需要的是一個旅游網站,那么重復以上步驟之后,你需要把數據庫文件abc.sql覆蓋到數據庫中,因為這個abc.sql文件是我修改了電商代碼,轉換成我的旅游網站的數據庫,里面有大量旅游頁面的數據。
如有不懂,可以問我,這是本人花了大量時間的成果,希望各位拿去參考。
代碼片段和文件信息
package?com.enation.app.base;
import?org.dom4j.Document;
import?com.enation.app.base.core.service.impl.cache.SiteMenuCacheProxy;
import?com.enation.app.base.core.service.impl.cache.SitemapCacheProxy;
import?com.enation.app.base.core.service.solution.impl.SqlExportService;
import?com.enation.eop.resource.impl.cache.ThemeUriCacheProxy;
import?com.enation.eop.resource.model.EopSite;
import?com.enation.eop.sdk.App;
import?com.enation.eop.sdk.context.EopContext;
import?com.enation.eop.sdk.context.EopSetting;
import?com.enation.framework.cache.CacheFactory;
import?com.enation.framework.database.IDBRouter;
import?com.enation.framework.database.ISqlFileExecutor;
/**
?*?base應用
?*?
?*?@author?kingapex?2010-9-20下午04:36:26
?*/
public?class?baseApp?extends?App?{
private?IDBRouter?baseDBRouter;
private?SqlExportService?sqlExportService;
private?ISqlFileExecutor?sqlFileExecutor;
public?baseApp()?{
tables.add(“adv“);
tables.add(“access“);
tables.add(“adcolumn“);
tables.add(“admintheme“);
tables.add(“auth_action“);
tables.add(“border“);
tables.add(“friends_link“);
tables.add(“guestbook“);
tables.add(“menu“);
tables.add(“role“);
tables.add(“role_auth“);
tables.add(“settings“);
tables.add(“site_menu“);
tables.add(“user_role“);
tables.add(“widgetbundle“);
}
/**************?應用的一些基礎信息?***********/
public?String?getId()?{
return?“base“;
}
public?String?getName()?{
return?“base應用“;
}
public?String?getNameSpace()?{
return?“/core“;
}
/**
?*?在進行saas式安裝時為某用戶初始化數據庫
?*/
public?void?saasInstall()?{
for?(int?i?=?0;?i? baseDBRouter.createTable(tables.get(i));
}
/**
?*?Try?dumpSql(org.dom4j.Document?document)
?*/
@Deprecated
public?String?dumpSql()?{
return?““;
}
public?String?dumpSql(Document?setup)?{
StringBuffer?sql?=?new?StringBuffer();
//?tables.add(“adminuser“);?//不導出管理員數據
sql.append(this.sqlExportService.dumpSql(tables?“clean“?setup));
sql.append(this.createbaseAppSql());
return?sql.toString();
}
/**
?*?創建導出base應用的sql:
?*?當前包含了更新站點:如名稱,標志、keyword等,其它標志等信息如是fs格式,應包含在attachment一上起導出了。
?*?
?*?@return
?*/
private?String?createbaseAppSql()?{
EopSite?site?=?EopContext.getContext().getCurrentSite();
String?logofile?=?site.getLogofile();
String?icofile?=?site.getIcofile();
String?upath?=?EopSetting.IMG_SERVER_DOMAIN
+?EopContext.getContext().getContextPath();
if?(icofile?!=?null)
icofile?=?icofile.replaceAll(upath?“fs:“);
if?(logofile?!=?null)
logofile?=?logofile.replaceAll(upath?“fs:“);
String?sql?=?“update?eop_site?set?sitename=‘“?+?site.getSitename()
+?“‘logofile=‘“?+?logofile?+?“‘icofile=‘“?+?icofile
+?“‘keywords=‘“?+?site.getKeywords()?+?“‘descript=‘“
+?site.getDescript()
+?“‘?where?userid=?and?id=;\n“;
return?sql;
}
/**
?*?系統初始化安裝時安裝base的sql腳本
?*/
public?void?install()?{
t
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????955??2015-04-23?12:00??旅游網站\javamall\.classpath
?????文件???????1257??2015-04-16?16:22??旅游網站\javamall\.project
?????文件????????454??2011-12-06?11:17??旅游網站\javamall\.settings\.jsdtscope
?????文件????????127??2015-04-22?16:44??旅游網站\javamall\.settings\com.genuitec.eclipse.core.prefs
?????文件???????3132??2015-04-28?16:30??旅游網站\javamall\.settings\org.eclipse.core.resources.prefs
?????文件????????629??2011-12-06?11:17??旅游網站\javamall\.settings\org.eclipse.jdt.core.prefs
?????文件????????873??2012-06-07?16:10??旅游網站\javamall\.settings\org.eclipse.wst.common.component
?????文件????????280??2011-12-06?11:17??旅游網站\javamall\.settings\org.eclipse.wst.common.project.facet.core.xm
?????文件?????????49??2011-12-06?11:17??旅游網站\javamall\.settings\org.eclipse.wst.jsdt.ui.superType.container
?????文件??????????6??2011-12-06?11:17??旅游網站\javamall\.settings\org.eclipse.wst.jsdt.ui.superType.name
?????文件????2576623??2015-04-29?14:01??旅游網站\javamall\abc.sql
?????文件??????15214??2011-12-21?16:53??旅游網站\javamall\ba
?????文件???????4854??2011-12-21?16:52??旅游網站\javamall\ba
?????文件??????14542??2011-12-06?11:17??旅游網站\javamall\ba
?????文件??????34188??2011-12-06?11:17??旅游網站\javamall\ba
?????文件???????3472??2011-12-21?16:53??旅游網站\javamall\ba
?????文件???????2080??2011-12-06?11:17??旅游網站\javamall\ba
?????文件???????6363??2015-04-22?09:37??旅游網站\javamall\ba
?????文件???????5112??2011-12-06?11:17??旅游網站\javamall\ba
?????文件???????3139??2011-12-06?11:17??旅游網站\javamall\ba
?????文件???????2016??2011-12-06?11:17??旅游網站\javamall\ba
?????文件???????2576??2011-12-06?11:17??旅游網站\javamall\ba
?????文件???????1101??2011-12-06?11:17??旅游網站\javamall\ba
?????文件????????866??2011-12-06?11:17??旅游網站\javamall\ba
?????文件???????1239??2011-12-06?11:17??旅游網站\javamall\ba
?????文件???????1176??2011-12-06?11:17??旅游網站\javamall\ba
?????文件???????1235??2011-12-06?11:17??旅游網站\javamall\ba
?????文件??????13372??2011-12-21?16:53??旅游網站\javamall\ba
?????文件???????3706??2011-12-06?11:17??旅游網站\javamall\ba
?????文件???????2488??2011-12-06?11:17??旅游網站\javamall\ba
............此處省略7234個文件信息
評論
共有 條評論