Improve dependency injection during instance creation

Description

Originally part of https://mycore.atlassian.net/browse/MCR-2843 :


Some updates to MCRProperty and MCRConfigurableInstanceHelper were necessary or helpful for this, namely:

  • An ordered-property in MCRProperty that determines in which order annotated methods are called

  • An defaultName-property that points to a fallback value that should be used, if no specific configuration value is present

For consistency, the ordered-property has also been added to MCRPostConstruction. MCRConfigurableInstanceHelper now throws specific error messages, if an annotated field has the wrong type or if an annotated method has the wrong parameter types. Also, the parameter of a method annotated with MCRPostConstruction is now optional.

Environment

None

Activity

Fixed

Details

Assignee

Reporter

Fix versions

Priority

Created March 15, 2023 at 7:33 AM
Updated July 13, 2023 at 10:35 AM
Resolved July 13, 2023 at 9:04 AM