by Hannes Dr
This simple framework connects the advantage of package managers like Maven (or any other) with the Java plugin loader ServiceLoader and a clean SOLID design pattern by providing a dynamic way of dependency injection.
ExampleApp extends AbstractApp implements App
- main(): void
DataSourceModel extends Module
- loadData(Class): FORMAT
PrettyPrinterModel extends Module
- getPrettyPrinter
PrettyPrinter extends Service
- prettify(FORMAT): String
XmlPrettyPrinter extends PrettyPrinter
- prettify(Document): String
JsonPrettyPrinter extends PrettyPrinter
- prettify(String): String
-> depends on JsonParser which is provided via ParserModule so you can introduce new interfaces without touching the dependency injection implementation of your application. You simply need to adjust your pom.xml