use of com.zrlog.web.config.ZrLogConfig in project zrlog by 94fzb.
the class InstallController method installZrlog.
/**
* 数据库检查通过后,根据填写信息,执行数据表,表数据的初始化
*/
public void installZrlog() {
String home = getRequest().getScheme() + "://" + getRequest().getHeader("host") + getRequest().getContextPath() + "/";
Map<String, String> dbConn = (Map<String, String>) JFinal.me().getServletContext().getAttribute("dbConn");
Map<String, String> configMsg = new HashMap<>();
configMsg.put("title", getPara("title"));
configMsg.put("second_title", getPara("second_title"));
configMsg.put("username", getPara("username"));
configMsg.put("password", getPara("password"));
configMsg.put("email", getPara("email"));
configMsg.put("home", home);
if (new InstallService(PathKit.getWebRootPath() + "/WEB-INF", dbConn, configMsg).install()) {
render("/install/success.jsp");
ZrLogConfig config = (ZrLogConfig) JFinal.me().getServletContext().getAttribute("config");
// 通知启动插件,配置库连接等操作
config.installFinish();
}
}
Aggregations