Closed
Description
initApplicationEventMulticaster()
in AbstractApplicationContext
creates a new SimpleApplicationEventMulticaster
instance and registers it in the container, but the Executor
in it is always null
because there is no autowiring for it.
Code as below:
So, when it runs it always steps into the else
clause. I would like to ask if I want to invoke listener async, must I use @Async
?
Although @Async
can work because of dynamic proxy technique.
Or, must I manually set an async Executor
in the SimpleApplicationEventMulticaster
instance?
I feel puzzled for the code above.
Best Regards