-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inject all properties of an artifact e.g. @Inject @BatchProperties Properties #133
Comments
Guess it is more a matter of defining wat @BatchProperty types are supported? Currently spec is quite silent on that. |
I think this is part of the issue to support the injection of common data
types, such as primitives and wrappers, collections, date, etc. JBeret
already supports some of these:
For example, to inject a Map or Properties, in job.xml
<property name="map" value="b=2, a = 1"/>
In injecting class:
@Inject @BatchProperty(name = "map")
Properties properties;
This approach can also be generalized to support arbitrary user data types,
specifying the property name as a JSON format, and bind to the target type
via JSONB or the like:
<property name="person" value="{firstName=x, lastName=y, age=20}"/>
…On Thu, Apr 1, 2021 at 9:27 AM Romain Manni-Bucau ***@***.***> wrote:
Guess it is more a matter of defining wat @BatchProperty types are
supported? Currently spec is quite silent on that.
Batchee and jberet support it AFAIK so can be worth just reusing
@BatchProperty no?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#133 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAP3UE3TEVUKJ3KAQPXMFS3TGRYE5ANCNFSM4QD3CNYA>
.
|
Hmm, yes, originally this was intended to just take the String BatchProperty values and inject them all at once, but good points from Romain, Cheng... that this needs to be considered in light of: #43 |
Seems we're not going to get to this in 2.1. |
All the entire set of properties to be injected at once into a single Properties object. Application can them get a list of properties from the Properties object rather than having to know and hard-code for them ahead of time.
The text was updated successfully, but these errors were encountered: