/**
* 在容器启动的时候 加载没问完成的消息重发
* @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();
} }

  

05-12 04:28