public class BeanUtilsTestContextInjectionExecutionListener
extends org.springframework.test.context.support.AbstractTestExecutionListener
ApplicationContext
from
the TestContext
into BeanUtils
so that it can locate
beans inside the test context instead of using DefaultLocatorFactory
.
If BeanUtils
uses DefaultLocatorFactory
, it will start
up another Spring context hierarchy inside the tests causing duplicate
beans.Constructor and Description |
---|
BeanUtilsTestContextInjectionExecutionListener() |
Modifier and Type | Method and Description |
---|---|
void |
beforeTestMethod(org.springframework.test.context.TestContext testContext) |
public BeanUtilsTestContextInjectionExecutionListener()
public void beforeTestMethod(org.springframework.test.context.TestContext testContext) throws Exception
beforeTestMethod
in interface org.springframework.test.context.TestExecutionListener
beforeTestMethod
in class org.springframework.test.context.support.AbstractTestExecutionListener
Exception
Copyright © 2017. All rights reserved.