preparePodFactory method
Prepares the ConfigurableListablePodFactory for this context.
Subclasses typically register default pods, configure singleton pods, or set up dependency wiring at this stage.
Example:
@override
Future<void> preparePodFactory(ConfigurableListablePodFactory factory) async {
factory.registerSingleton('myService', object: ObjectHolder(MyService()));
}
This is part of Jetleaf – a framework which developers can use to build web applications.
Implementation
@override
Future<void> preparePodFactory(ConfigurableListablePodFactory podFactory) async {
await super.preparePodFactory(podFactory);
_reader = AnnotatedPodDefinitionReader();
_reader.setEnvironment(getEnvironment());
_reader.setPodFactory(podFactory);
setAllowDefinitionOverriding(false);
setAllowCircularReferences(true);
setAllowRawInjection(true);
return await _reader.doRegister(getMainApplicationClass());
}