摘要: 实现步骤 自定义需要发布的事件类,需要继承 ApplicationEvent 使用 @EventListener 来监听事件或者实现 ApplicationListener 接口。 使用 ApplicationEventPublisher 来发布自定义事件(@Autowired注入即可) 代码 // 阅读全文
posted @ 2021-05-24 18:04 LiuChengloong 阅读(139) 评论(0) 推荐(0) 编辑