Java Factory Provider
An implementation of the factory provider pattern, allowing users to consume objects based on interfaces rather than implementation.
This project serves as an example of how to:
- Logging based on levels
- Consume objects in other projects without needing direct references
Tools and Technologies
This project assumes that you are using:
- IntelliJ community
- Java 8
Running the Code
There are four separate projects:
- Contains base factory provider code, as well as a basic logging service
- Trivial override of the basic logging service in the .Core project
- Provides a factory provider module that will be registered in the example project, that tells the FactoryProvider to use the "SampleLog" logger instead of the default one
- Provides a basic console application that demonstrates the two different loggers
There's an "Example Project" configuration that can be ran/debugged within IntelliJ, and will display the following output:
- INFO : This is a test message.
- FOO! INFO : <--- this should have FOO prepended.
- Readme borrowed from PurpleBooth