basesiteconfig.java

来自「简易java框架开源论坛系统,简 易java框架开源论坛系统」· Java 代码 · 共 61 行

JAVA
61
字号
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 + =
减小字号Ctrl + -
显示快捷键?