-
Enhancement
-
Resolution: Done
-
Minor
-
None
-
8
-
2020 Week 28-30 (from Jul 6)
The ApplicationConfig class represents a container of all the beans required to configure the Application, but, in fact, the generated version is cluttered with a lot of initialization logic.
E.g. for every bean that can be injected in one of the subconfigurations (i.e. ProcessConfig, RuleConfig) the “default bean” is always instantiated as private field and stays there for the whole existence of the application even if the injected version is found and preferred over it.
My suggestion is to:
- stop generating ApplicationConfig directly and leave it and its subconfigurations as plain POJOs,
- move the initialization logic in a dedicated generated ConfigProducer class that is invoked by the underlying DI framework at the beginning of the execution and doesn’t leave anything behind once they are built.
Each ApplicationSection could still inject its piece of logic in the main ConfigProducerGenerator, like it is now with ConfigGenerator.
- is duplicated by
-
KOGITO-2546 Refactor process/rules/decision-specific config out of ApplicationConfig
- Resolved
- is incorporated by
-
KOGITO-1649 Restructure codegen to make it extensible and cleaner (Part 1)
- Resolved
- relates to
-
KOGITO-1492 Allow to inject event listeners instead of using *EventListenerConfig
- Resolved
-
KOGITO-1766 Add guidelines for (C)DI in codegen
- Closed