|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||
@Documented @Inherited @Retention(value=RUNTIME) @Target(value=TYPE) public @interface ExtendedContextConfiguration
In addition Spring's @ContextConfiguration, provides
settings for the ModuleApplicationContext to be created.
WARNING: For the settings to be applied to the ApplicationContext,
the contextLoader attribute of the @ContextConfiguration
annotation MUST BE A SUBTYPE OF ModuleTestContextLoader.
Typically, you would annotate your test classes as follows:
@RunWith(EL4JJunit4ClassRunner.class)
@ExtendedContextConfiguration(exclusiveConfigLocations = {
"classpath*:mandatory/refdb-core-config.xml",
"classpath*:mandatory/keyword-core-config.xml" },
allowBeanDefinitionOverriding = "true")
@ContextConfiguration(
locations = {
"classpath*:mandatory/*.xml",
"classpath*:scenarios/db/raw/*.xml",
...
},
loader = ModuleTestContextLoader.class)
@Transactional
public abstract class AbstractJpaDaoTest
The exclusiveConfigLocations parameter is affected by @ContextConfiguration's
inheritLocations attribute, i.e. the paths to be excluded are overridden or merged depending
on the value of inheritLocations.
The boolean properties of ModuleApplicationContextConfiguration have to be specified as String
values which allows one to only specify the properties whose values vary from the values specified in
the superclasses' @ExtendedContextConfiguration specification.
ModuleApplicationContextConfiguration| Optional Element Summary | |
|---|---|
String |
allowBeanDefinitionOverriding
Indicates if bean definition overriding is enabled. |
String[] |
exclusiveConfigLocations
Exclusive config locations. |
String |
mergeWithOuterResources
Indicates if unordered/unknown resources should be used. |
String |
mostSpecificBeanDefinitionCounts
Indicates if the most specific bean definition counts. |
String |
mostSpecificResourceLast
Indicates if the most specific resource should be the last resource in the fetched resource array. |
public abstract String[] exclusiveConfigLocations
ContextConfiguration.inheritLocations() property
affects the behaviour of exclusiveConfigLocations in the same way
it affects the ContextConfiguration.locations().
public abstract String allowBeanDefinitionOverriding
"true" or "false".
public abstract String mergeWithOuterResources
"true" or "false".
public abstract String mostSpecificResourceLast
true
and only one resource is requested the least specific resource will be
returned.
Must be "true" or "false".
public abstract String mostSpecificBeanDefinitionCounts
"true" or "false".
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||