| | |
| | | import com.zy.acs.manager.core.service.MainService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.boot.context.event.ApplicationReadyEvent; |
| | | import org.springframework.context.event.EventListener; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.PostConstruct; |
| | | import javax.annotation.PreDestroy; |
| | | |
| | | /** |
| | |
| | | @Autowired |
| | | private MainService mainService; |
| | | |
| | | @PostConstruct |
| | | @EventListener(ApplicationReadyEvent.class) |
| | | private void start(){ |
| | | thread = new Thread(() -> { |
| | | while (!Thread.currentThread().isInterrupted()) { |