Class AutowireAware
java.lang.Object
io.github.astrapi69.spring.autowire.AutowireAware
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
@Component
public final class AutowireAware
extends Object
implements org.springframework.context.ApplicationContextAware
Utility class for autowire classes like in jpa listeners
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
Try to autowire the given object that contains the bean instances which need to be autowiredvoid
setApplicationContext
(org.springframework.context.ApplicationContext applicationContext)
-
Method Details
-
autowire
Try to autowire the given object that contains the bean instances which need to be autowired- Parameters:
classHolderToAutowire
- the holder instance of the class which holds @Autowire annotationsbeansToAutowireInClass
- the beans which have the @Autowire annotation in the specified {#classHolderToAutowire}
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) - Specified by:
setApplicationContext
in interfaceorg.springframework.context.ApplicationContextAware
-