通过applicationContext.publishEvent这种方式发送的事件,默认是同步处理,如果在listener那里通过加上@Async则可以变成异步处理。
spring事件机制
于 2022-02-08 09:44:48 首次发布
通过applicationContext.publishEvent这种方式发送的事件,默认是同步处理,如果在listener那里通过加上@Async则可以变成异步处理。