Details
-
Task
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.1M1
-
None
-
None
Description
1. DI wIll support optional named bindings to allow multiple instances of the same type of DI object. E.g.:
Binder.bind(Class<T> interfaceType, String bindingName)
2. DI map and list bindings will no longer be tied to the type of object they are injected to. Instead such bindings will require a name. E.g.:
Binder.bindMap(String bindingName) // Map.class will be used implicitly as the type
...
Someclass {
public Someclass(@Inject("xyz") Map<String, String> map)
{ ... }}
Note that both DI features are intentionally simplified versions of the corresponding Guice features to avoid overcomplicating of Cayenne DI. E.g. #1 in Guice is done with custom annotations, not Strings, and #2 allows distinguishing between the maps by their parameterized key and value types (same for lists).
Attachments
Issue Links
- is depended upon by
-
CAY-1420 Migrate ROP server-side components to DI-based stack
- Closed