📄 basesiteconfig.java
字号:
package com.easyjf.news.business;
import java.io.File;
import com.easyjf.web.Globals;
public class BaseSiteConfig {
private final static BaseSiteConfig siteConfig=new BaseSiteConfig();
private String upfileRootPath=Globals.APP_BASE_DIR+"/upfile/";
private String htmlFilePath="/html";
private String templatePath;
private boolean toStaticHtml=false;//是否转换保存为静态html
private String siteTitle;//网站标题
private BaseSiteConfig()
{
SiteConfig config=SystemUtil.getSiteConfig();
if(config!=null){
upfileRootPath=config.getUpfileDir();
htmlFilePath=config.getStaticDir();
if(config.getToStatic()!=null && config.getToStatic().intValue()>0)
toStaticHtml=true;
}
File dir=new File(upfileRootPath);
if(!dir.exists())dir.mkdirs();
templatePath=Globals.DEFAULT_TEMPLATE_PATH;
}
public static BaseSiteConfig getInstance()
{
return siteConfig;
}
public String getTemplatePath() {
return templatePath;
}
public void setTemplatePath(String templatePath) {
this.templatePath = templatePath;
}
public String getUpfileRootPath() {
return upfileRootPath;
}
public void setUpfileRootPath(String upfileRootPath) {
this.upfileRootPath = upfileRootPath;
}
public String getHtmlFilePath() {
return htmlFilePath;
}
public void setHtmlFilePath(String htmlFilePath) {
this.htmlFilePath = htmlFilePath;
}
public boolean isToStaticHtml() {
return toStaticHtml;
}
public void setToStaticHtml(boolean toStaticHtml) {
this.toStaticHtml = toStaticHtml;
}
public String getSiteTitle() {
return siteTitle;
}
public void setSiteTitle(String siteTitle) {
this.siteTitle = siteTitle;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -