Spring Boot - Async Processing
Given the code below, 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 task started");
}
public void mainMethod() {
System.out.println("Main method start");
asyncMethod();
System.out.println("Main method end");
}
}