extract spring-scheduling module

This commit is contained in:
Denis
2019-08-31 15:39:30 +02:00
parent f47704e89d
commit 9fd2fb32ca
28 changed files with 42 additions and 4 deletions

View File

@@ -0,0 +1,26 @@
package org.baeldung.async;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath:springAsync-config.xml")
public class AsyncWithXMLIntegrationTest {
@Autowired
private AsyncComponent asyncAnnotationExample;
// tests
@Test
public void testAsyncAnnotationForMethodsWithVoidReturnType() throws InterruptedException {
System.out.println("Start - invoking an asynchronous method. " + Thread.currentThread().getName());
asyncAnnotationExample.asyncMethodWithVoidReturnType();
Thread.sleep(2000);
System.out.println("End - invoking an asynchronous method. ");
}
}