Package org.jbehave.core.steps.spring
Class SpringApplicationContextFactory
- java.lang.Object
-
- org.jbehave.core.steps.spring.SpringApplicationContextFactory
-
public class SpringApplicationContextFactory extends Object
Factory for SpringApplicationContextusing the specified resources. The resources can be expressed as:- Annotated class names
- XML location paths
AnnotationConfigApplicationContext, if the resources are annotated class names, orGenericApplicationContextotherwise.
-
-
Constructor Summary
Constructors Constructor Description SpringApplicationContextFactory(ClassLoader classLoader, String... resources)SpringApplicationContextFactory(String... resources)SpringApplicationContextFactory(org.springframework.context.ApplicationContext parent, ClassLoader classLoader, String... resources)
-
Method Summary
Modifier and Type Method Description org.springframework.context.ConfigurableApplicationContextcreateApplicationContext()Creates a configurable application context from the resources provided.
-
-
-
Constructor Detail
-
SpringApplicationContextFactory
public SpringApplicationContextFactory(String... resources)
-
SpringApplicationContextFactory
public SpringApplicationContextFactory(ClassLoader classLoader, String... resources)
-
SpringApplicationContextFactory
public SpringApplicationContextFactory(org.springframework.context.ApplicationContext parent, ClassLoader classLoader, String... resources)
-
-
Method Detail
-
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
-
-