-
Notifications
You must be signed in to change notification settings - Fork 285
Closed
Labels
core featureenhancementNew feature or requestNew feature or requeststoryOverarching issue with linked sub-issuesOverarching issue with linked sub-issuestriageall new issues awaiting classificationall new issues awaiting classification
Milestone
Description
Feature Request
Implement a feature that enables configuration injection. By annotating certain field values it should be possible to automatically resolve and set config values, for example:
public class SomeExtension extends ServiceExtension {
@Setting(key = "edc.some.config.value", required = true, defaultValue = "barbaz")
private String someConfigValue
}thus, someConfigValue gets assigned the value of edc.some.config.value, or - lacking that - the default value "barbaz".
In addition, it should be able to group config values together in a configuration object, which is basically a POJO:
public class SomeExtension extends ServiceExtension {
@Configuration
private SomeConfigObject configObject;
}
public record SomeConfigObject(@Setting(key="...") String stringValue,
@Setting(key="...") Double doubleValue){
}Which Areas Would Be Affected?
dependency injection, ultimately the entire code base
Why Is the Feature Desired?
ease of use
Solution Proposal
enhance the InjectionPoint implementations, move some responsibility into the FieldInjectionPoint to allow changing the behaviour in other impls.
Subtasks
- Decision-Record docs: decision record about configuration injection #4611
- Implementation of the configuration injection (including runtime metamodel and autodoc)
- Adapting the code base to utilize this feature
- Update the EDC documentation
Metadata
Metadata
Assignees
Labels
core featureenhancementNew feature or requestNew feature or requeststoryOverarching issue with linked sub-issuesOverarching issue with linked sub-issuestriageall new issues awaiting classificationall new issues awaiting classification