In previous sections, I alluded to the fact that JIT injection can be used with private and public dependencies, two very different use cases. In this section, we will apply both options to achieve very different results.
Applying JIT injection
Private dependencies
There are many places we could improve our service by applying JIT injection. So, how do we decide? Let's see what our dependency graph has to say:
There are lots of connections going into the logging package. But we have already decoupled that a reasonable amount in Chapter 8, Dependency Injection by Config.
The next package with the most users is the data package. We worked on that back in Chapter 5, Dependency Injection with Monkey Patching, but maybe...