com.haoxuer.discover.web.data.common.InitConfig Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of discover-website Show documentation
Show all versions of discover-website Show documentation
discover网站配置模块,主要管理网站主题,网站配置等功能
package com.haoxuer.discover.web.data.common;
import com.haoxuer.discover.web.data.entity.WebConfig;
import com.haoxuer.discover.web.data.service.WebConfigService;
import org.springframework.beans.factory.annotation.Autowired;
/**
* 网站配置初始化.
*/
public class InitConfig {
@Autowired
private WebConfigService webConfigMapper;
private static WebConfig webConfig;
public void initWebConfig() {
webConfig = webConfigMapper.config();
}
public static WebConfig getWebConfig() {
if (webConfig == null) {
webConfig = new WebConfig();
webConfig.setTheme("default");
webConfig.setAdminTheme("default");
}
return webConfig;
}
public static void setWebConfig(WebConfig webConfig) {
InitConfig.webConfig = webConfig;
}
}