package com.lf.server.config; import com.lf.server.helper.GdalHelper; 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) { // noinspection AlibabaRemoveCommentedCode try { // "E:\\data\\7.Insar\\insartest.tif","E:\\data\\6.高光谱\\GF5_Cut_1.img","E:\\data\\22.tif\\110.747 sq km.tif","E:\\Test\\Test.gdb" //GdalHelper.readTif("E:\\data\\7.Insar\\insartest.tif") //GdalHelper.readShp("E:\\data\\13.cppe\\shps\\addr.shp"); //GdalHelper.readGdb("E:\\Test\\addr.gdb"); pathHelper.init(); argsService.initSettingData(); log.info("***************** 系统启动完毕 *****************" + "\n"); } catch (Exception ex) { log.error(ex.getMessage() + ex.getStackTrace() + "\n"); } } }