/** * 在容器启动的时候 加载没问完成的消息重发 * @author zhangyukun * */ @Component @Slf4j public class LoadMessageListener implements ApplicationListener<ContextRefreshedEvent>,Ordered { @Autowired QueueMessageService queueMessageService; @Override public int getOrder() { return Integer.MAX_VALUE; } @Override public void onApplicationEvent(ContextRefreshedEvent event) { log.debug("初始化为完成的的消息................."); queueMessageService.initLoadUnSucceed(); } }
原文地址:https://www.cnblogs.com/cxygg/p/11684682.html
时间: 2024-10-13 13:59:24