月球大数据地理空间分析展示平台-【后端】-月球后台服务
13693261870
2023-07-18 243a135077985aa517e00320a7327bb8c459f460
src/main/java/com/moon/server/config/InitConfig.java
@@ -1,17 +1,19 @@
package com.moon.server.config;
import com.moon.server.entity.all.StaticData;
import com.moon.server.service.all.TestService;
import com.moon.server.service.all.UploadAttachService;
import com.moon.server.service.sys.ArgsService;
import com.moon.server.helper.GdalHelper;
import com.moon.server.helper.PathHelper;
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.core.env.Environment;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
/**
 * 初始化完成配置类
@@ -21,17 +23,17 @@
public class InitConfig implements ApplicationRunner {
    private final static Log log = LogFactory.getLog(InitConfig.class);
    @Autowired
    @Resource
    PathHelper pathHelper;
    @Autowired
    @Resource
    ArgsService argsService;
    @Autowired
    @Resource
    Environment env;
    //@Autowired
    //TestService testService;
    @Resource
    TestService testService;
    @Override
    public void run(ApplicationArguments args) {
@@ -40,7 +42,8 @@
            GdalHelper.init(env.getProperty("sys.gdal_path"));
            UploadAttachService.init(env.getProperty("sys.attachTabs"));
            //testService.testRegister();
            //testService.testPerms();
            pathHelper.init();
            StaticData.ADMIN = env.getProperty("sys.admin");
            argsService.initSettingData();