This commit is contained in:
tanghc
2019-11-25 16:11:39 +08:00
parent 2e853bb77c
commit 3cf806cc90

View File

@@ -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);
}
}