| | |
| | | import org.springblade.mdm.machinefile.service.MachineFileScanService; |
| | | import org.springblade.mdm.machinefile.service.MachineFileService; |
| | | import org.springblade.mdm.program.service.ProgramAnnotationService; |
| | | import org.springblade.system.feign.ISysClient; |
| | | import org.springframework.scheduling.annotation.Async; |
| | | import org.springframework.scheduling.annotation.EnableAsync; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | |
| | | private final ProgramAnnotationService annotationService; |
| | | private final MachineFileScanService machineFileScanService; |
| | | private final TaskDispatchService taskDispatchService; |
| | | |
| | | //@Value("${task.file_scan_on_start:true}") |
| | | //@Value("${task.fileScanOnStart:true}") |
| | | //public boolean fileScanOnStart; |
| | | private final TaskPropertieBean taskPropertieBean; |
| | | @PostConstruct |
| | | public void init() { |
| | | log.info("应用启动时执行初始化操作 @PostConstruct"); |
| | | String networkType = paramService.networkType(); |
| | | if(!ParamService.NETWORK_TYPE_SHEMI.equals(networkType)) { |
| | | machineFileScanService.scanMachineFile(); |
| | | if(taskPropertieBean.isFileScanOnStart()) { |
| | | machineFileScanService.scanMachineFile(); |
| | | } |
| | | |
| | | //工控网才启动文件监控 |
| | | log.info("工控网启动文件监控"); |