From 0f65c815fedd17678d058f443a2fc8943ebd20e8 Mon Sep 17 00:00:00 2001 From: RYAN0UP_ Date: Tue, 15 May 2018 16:18:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=AC=AC=E4=B8=80=E6=AC=A1?= =?UTF-8?q?=E5=AE=89=E8=A3=85=E5=90=AF=E5=8A=A8=E6=97=B6=E9=A6=96=E9=A1=B5?= =?UTF-8?q?500=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/cc/ryanc/halo/config/StartupConfig.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/cc/ryanc/halo/config/StartupConfig.java b/src/main/java/cc/ryanc/halo/config/StartupConfig.java index e1dca01d1..17cebf638 100755 --- a/src/main/java/cc/ryanc/halo/config/StartupConfig.java +++ b/src/main/java/cc/ryanc/halo/config/StartupConfig.java @@ -46,8 +46,11 @@ public class StartupConfig implements ApplicationListener private void loadActiveTheme(){ try { String themeValue = optionsService.findOneOption("theme"); - if(StringUtils.isNotEmpty("themeValue")){ + if(StringUtils.isNotEmpty("themeValue") && !StringUtils.equals(themeValue,null)){ BaseController.THEME = themeValue; + }else{ + //以防万一 + BaseController.THEME = "anatole"; } }catch (Exception e){ log.error("加载主题设置失败:{0}",e.getMessage());