動態

列表
創建 時間

《底層到底做了什麼》--- spring 的 @EnableAsync

在spring 框架中開啓某項功能,常常會在Application類中使用@EnableXXX註解,來開啓某個功能。“開啓”其實就是把相關的bean注入spring容器中。 以@EnableAsync為例。在@EnableAsync中使用@import把相關的bean注入容器中,這個bean默認是ProxyAsyncConfiguration。ProxyAsyncConfiguration是個@C