How to segregate imports of module being 'aware of' away from Spring wiring?

So… It works and here are a few things to know as per my latest understanding of things:

  1. Segregate and isolate all imports from the module being aware of into one bean implementation class.
  2. That bean is entirely defined for Spring through its @OpenmrsProfile annotation. There should be (1) no entry in the application context XML file and (2) no @Component annotation. Those would trigger Spring to wire that bean ahead of the OpenMRS-specific conditions leading to runtime trouble. All this implies that the bean won’t have a known bean ID, meaning that…
  3. This bean can only be @Autowired, and even presumably @Autowired(required = false) depending on the conditions.

All the above can lead to a slight headache on the context-sensitive tests side of things. Hence those two new topics on which I would be eager to get input:

@mogoodrich basically this all means that the PR for ADDR-108 is being delayed… :unamused: