Package org.jbehave.core.steps.spring
Class SpringApplicationContextFactory
java.lang.Object
org.jbehave.core.steps.spring.SpringApplicationContextFactory
Factory for Spring
ApplicationContext using the specified resources.
The resources can be expressed as:
- Annotated class names
- XML location paths
AnnotationConfigApplicationContext,
if the resources are annotated class names, or
GenericApplicationContext otherwise.-
Constructor Summary
ConstructorsConstructorDescriptionSpringApplicationContextFactory(ClassLoader classLoader, String... resources) SpringApplicationContextFactory(String... resources) SpringApplicationContextFactory(org.springframework.context.ApplicationContext parent, ClassLoader classLoader, String... resources) -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.context.ConfigurableApplicationContextCreates a configurable application context from the resources provided.
-
Constructor Details
-
SpringApplicationContextFactory
-
SpringApplicationContextFactory
-
SpringApplicationContextFactory
public SpringApplicationContextFactory(org.springframework.context.ApplicationContext parent, ClassLoader classLoader, String... resources)
-
-
Method Details
-
createApplicationContext
public org.springframework.context.ConfigurableApplicationContext createApplicationContext()Creates a configurable application context from the resources provided. The context will be an instance ofAnnotationConfigApplicationContext, if the resources are annotated class names, orGenericApplicationContextotherwise.- Returns:
- A ConfigurableApplicationContext
-