Spring Boot - Async Processing
Given the following code snippet, what will be the output when
mainMethod() is called?@EnableAsync
@Configuration
public class AppConfig {}
@Service
public class MyService {
@Async
public void asyncMethod() {
System.out.println("Async method started");
}
public void mainMethod() {
asyncMethod();
System.out.println("Main method finished");
}
}