@groovy.util.logging.Slf4j @groovy.transform.CompileStatic class DefaultApplicationContextResolver extends java.lang.Object implements ApplicationContextResolver
Default implementation of ApplicationContextResolver that resolves the ApplicationContext from the Spring TestContext captured by TestContextHolderListener.
The @Integration AST transformation adds @SpringBootTest and
@ContextConfiguration to the test class, so Spring's test infrastructure
manages the ApplicationContext lifecycle. The TestContextHolderListener
is auto-registered as a org.springframework.test.context.TestExecutionListener
and captures the current TestContext on a java.lang.ThreadLocal before each test
method. This resolver simply reads from that java.lang.ThreadLocal.
| Constructor and description |
|---|
DefaultApplicationContextResolver() |
| Type Params | Return Type | Name and description |
|---|---|---|
|
ApplicationContext |
resolve(IMethodInvocation invocation) |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#equals(java.lang.Object), java.lang.Object#getClass(), java.lang.Object#hashCode(), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#toString(), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int) |