3 ms·
I guess I would call that scoping. Dagger can do this at resolution at compile time for example. So I don't see the connection to runtime resolution. > why wou
by nh23423fefe 3y ago
I guess I would call that scoping. Dagger can do this at resolution at compile time for example. So I don't see the connection to runtime resolution.
> why would I want to do it via DI container
I guess I don't follow why you wouldn't. Like, already assuming we are competent people, then you extend your object graph when it makes sense.
Does a prototype bean for {new ArrayList()} make sense? Probably not. But I could definitely see wiring up a CSVWriter with config properties from a container populated from various resources.
I buy the simple argument that DI is a better "new" and containers are just the interface to an named object graph.