Package com.gruelbox.transactionoutbox
Class SpringInstantiator
- java.lang.Object
-
- com.gruelbox.transactionoutbox.SpringInstantiator
-
- All Implemented Interfaces:
Instantiator
@Beta @Service public class SpringInstantiator extends Object implements Instantiator
Instantiator that uses the springApplicationContextto source objects. It requires that classes scheduled have a unique name in the context, so doesn't often play well with proxies and other auto-generated code such as repositories based onCrudRepository.
-
-
Constructor Summary
Constructors Constructor Description SpringInstantiator(org.springframework.context.ApplicationContext applicationContext)
-
-
-
Method Detail
-
getName
public String getName(Class<?> clazz)
- Specified by:
getNamein interfaceInstantiator
-
getInstance
public Object getInstance(String name)
- Specified by:
getInstancein interfaceInstantiator
-
-