首页>代码>SpringBoot开发非常美观的java博客系统(包含后台管理功能)>/mblog/mblog-base/src/main/java/mblog/base/context/Global.java
package mblog.base.context; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import mblog.base.lang.Consts; import mblog.base.utils.PropertiesLoader; /** * mblog 全局配置类 */ public class Global { /** * 保存全局属性值 */ private static ConcurrentMap<String, String> map = new ConcurrentHashMap<>(); /** * 属性文件加载对象 */ private static PropertiesLoader propertiesLoader = new PropertiesLoader(Consts.MTONS_CONFIG); private static Boolean imageDomain = null; private static String imageHost = null; /** * 获取配置 */ public static String getConfig(String key) { String value = map.get(key); if (value == null){ value = propertiesLoader.getProperty(key); map.put(key, value); } return value; } public static boolean getImageDomain() { if (imageDomain == null) { imageDomain = propertiesLoader.getBoolean("resource.domain", false); } return imageDomain; } public static String getImageHost() { if (imageHost == null) { imageHost = propertiesLoader.getProperty("resource.host"); } return imageHost; } }

032932 LV1
2月22日
srmess LV4
2024年12月30日
Duangi LV1
2024年12月23日
zolscy LV24
2024年12月18日
xianyu091012 LV5
2024年11月19日
12347658 LV1
2024年11月13日
xunxia LV7
2024年10月10日
微信网友_7005760998215680 LV6
2024年10月2日
Cloong LV1
2024年8月22日
murphy LV7
2024年7月2日

15578157792 LV7
4月26日
vincemokea LV4
4月24日
暂无贡献等级
暂无贡献等级
哪里的完整版 LV8
4月1日
2022102154 LV1
3月27日
wjlsyq LV1
3月20日
benben2020
3月19日
暂无贡献等级
发答案法国
3月6日
暂无贡献等级
orang801 LV2
3月4日