|
@@ -1,32 +0,0 @@
|
|
|
-/*
|
|
|
- * *************************************************
|
|
|
- * Copyright (c) 2018 QMTH. All Rights Reserved.
|
|
|
- * Created by Deason on 2018-10-17 16:34:17.
|
|
|
- * *************************************************
|
|
|
- */
|
|
|
-
|
|
|
-package cn.com.qmth.examcloud.core.print.config;
|
|
|
-
|
|
|
-import cn.com.qmth.examcloud.commons.util.PathUtil;
|
|
|
-import cn.com.qmth.examcloud.commons.util.PropertiesUtil;
|
|
|
-import org.springframework.beans.factory.annotation.Value;
|
|
|
-import org.springframework.context.ApplicationListener;
|
|
|
-import org.springframework.context.annotation.Configuration;
|
|
|
-import org.springframework.context.event.ContextRefreshedEvent;
|
|
|
-
|
|
|
-/**
|
|
|
- * @author: fengdesheng
|
|
|
- * @since: 2018/10/17
|
|
|
- */
|
|
|
-@Configuration
|
|
|
-public class PropertiesConfig implements ApplicationListener<ContextRefreshedEvent> {
|
|
|
- @Value("${spring.profiles.active}")
|
|
|
- private String springProfilesActive;
|
|
|
-
|
|
|
- @Override
|
|
|
- public void onApplicationEvent(ContextRefreshedEvent event) {
|
|
|
- String resourceName = "application-" + springProfilesActive + ".properties";
|
|
|
- PropertiesUtil.configure(PathUtil.getResoucePath(resourceName));
|
|
|
- }
|
|
|
-
|
|
|
-}
|