管道基础大数据平台系统开发-【后端】-Server
1
13693261870
2022-10-13 f5d4d761789d31c359aa1d8487fc237a84f276d1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package com.lf.server.config;
 
import com.lf.server.helper.PathHelper;
import com.lf.server.service.sys.ArgsService;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;
 
/**
 * 初始化完成配置类
 * @author WWW
 */
@Component
public class InitConfig implements ApplicationRunner {
    private final static Log log = LogFactory.getLog(InitConfig.class);
 
    @Autowired
    PathHelper pathHelper;
 
    @Autowired
    ArgsService argsService;
 
    @Override
    public void run(ApplicationArguments args) {
        try {
            pathHelper.init();
 
            argsService.initSettingData();
 
            log.info("***************** 系统启动完毕 *****************" + "\n");
        } catch (Exception ex) {
            log.error(ex.getMessage() + ex.getStackTrace() + "\n");
        }
    }
}