| | |
| | | import com.lf.server.helper.*; |
| | | import com.lf.server.service.all.TestService; |
| | | import com.lf.server.service.all.UploadAttachService; |
| | | import com.lf.server.service.show.AutoQueryService; |
| | | 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.core.env.Environment; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * 初始化完成配置类 |
| | |
| | | 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 |
| | | //@Resource |
| | | //TestService testService; |
| | | |
| | | @Resource |
| | | AutoQueryService autoQueryService; |
| | | |
| | | @Override |
| | | public void run(ApplicationArguments args) { |
| | |
| | | argsService.initSettingData(); |
| | | |
| | | log.info("***************** 系统启动完毕 *****************" + "\n"); |
| | | |
| | | String autoQuery = env.getProperty("sys.autoQuery"); |
| | | if (StaticData.S1.equals(autoQuery)) { |
| | | autoQueryService.autoQuery(); |
| | | } |
| | | } catch (Exception ex) { |
| | | log.error(ex.getMessage(), ex); |
| | | } |