From 3cf806cc90575ad8a0583255eb5da41c8159edc2 Mon Sep 17 00:00:00 2001 From: tanghc Date: Mon, 25 Nov 2019 16:11:39 +0800 Subject: [PATCH] 2.5.4 --- .../com/gitee/sop/websiteserver/config/WebsiteConfig.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sop-website/src/main/java/com/gitee/sop/websiteserver/config/WebsiteConfig.java b/sop-website/src/main/java/com/gitee/sop/websiteserver/config/WebsiteConfig.java index 388c7fca..0142a941 100644 --- a/sop-website/src/main/java/com/gitee/sop/websiteserver/config/WebsiteConfig.java +++ b/sop-website/src/main/java/com/gitee/sop/websiteserver/config/WebsiteConfig.java @@ -23,6 +23,8 @@ import org.springframework.context.annotation.Configuration; import org.springframework.context.event.EventListener; import org.springframework.core.env.Environment; +import javax.annotation.PostConstruct; + /** * @author tanghc */ @@ -89,6 +91,11 @@ public class WebsiteConfig implements ApplicationRunner { */ @Override public void run(ApplicationArguments args) throws Exception { + + } + + @PostConstruct + public void after() { EnvironmentContext.setEnvironment(environment); } }