The @EnableAsync annotation tells Spring to look for methods annotated with @Async and run them in a separate thread, enabling asynchronous execution.
public class AppConfig {
// ...
}The correct way is to annotate a @Configuration class with @EnableAsync without parameters. Option D shows this correctly.
Spring uses proxies to intercept calls to @Async methods. Calling an @Async method from the same class bypasses the proxy, so it runs synchronously.
By default, Spring uses SimpleAsyncTaskExecutor which names threads with the prefix 'SimpleAsyncTaskExecutor-'.
@EnableAsync causes Spring to create proxies around beans that have @Async methods. These proxies intercept calls and run them asynchronously.
