Skip to content
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

new annotation @PropertyNamePrefix #28

Merged
merged 1 commit into from
Apr 25, 2016
Merged

new annotation @PropertyNamePrefix #28

merged 1 commit into from
Apr 25, 2016

Conversation

wuan
Copy link

@wuan wuan commented Mar 24, 2015

This annotation helps to extract a common property name prefix:

@PropertyNamePrefix("test.prefix.")
public class TestConfigPropertyNamePrefix {

    @PropertyValue("foo")
    private String foo;

The value of the field foo will be filled with the property named 'test.prefix.foo'.

More than one prefix can be specified:

@PropertyNamePrefix({"foo.", "bar."})

The first property found by name will be used to get the corresponding value.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.06%) to 97.109% when pulling d387195 on wuan:property_prefix into 4957d6d on TNG:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.06%) to 97.109% when pulling d387195 on wuan:property_prefix into 4957d6d on TNG:master.

@wuan wuan merged commit adcfb4b into TNG:master Apr 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants