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.ApplicationContextAwareThis class provides access to spring beans for classes not managed by Spring IOC container.
-
-
Constructor Summary
Constructors Constructor Description AdapterSpringContextProvider()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T> TgetBean(Class<T> beanClass)Get a Spring bean by type.static ObjectgetBean(String beanName)Get a Spring bean by name.voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext)
-
-
-
Method Detail
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
- Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware
-
getBean
public static <T> T getBean(Class<T> beanClass)
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
-
-