I would like to instantiate
org.openmrs.module.formentryapp.FormManager in my module’s activator. How do I achieve this so that all its
@Autowired members are constructed properly?
If I simply do this:
FormManager formManager = new FormManager();
It “works”, but in fact the
@Autowired members are not instantiated. For instance its
(FormEntryAppService) appService member remains
null. Of course, clearly, this way I simply bypassed Spring DI.
My question is: How can I trigger Spring DI in my module’s activator as it happens in controllers? …where something like
@SpringBean("formManager") FormManager formManager would be passed as an argument to some controller’s method.