Class AdapterSpringContextProvider
java.lang.Object
pro.taskana.adapter.configuration.AdapterSpringContextProvider
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware
@Component
@Scope("singleton")
public class AdapterSpringContextProvider
extends Object
implements org.springframework.context.ApplicationContextAware
This class provides access to spring beans for classes not managed by Spring IOC container.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
AdapterSpringContextProvider
public AdapterSpringContextProvider()
-
-
Method Details
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) - Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware
-
getBean
Get a Spring bean by type.- Type Parameters:
T- the type of the bean class- Parameters:
beanClass- the class of the bean- Returns:
- the bean
-
getBean
Get a Spring bean by name.- Parameters:
beanName- the name of the bean- Returns:
- the bean
-