-
-
Notifications
You must be signed in to change notification settings - Fork 212
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
@Prefix annotation on interfaces for keys #56
Comments
I like both, the @KeyPrefix and the variable expansion in the |
In particular, consider a property file like this # Production settings
prod.service.endpoint=http://productionserver:80
# Development settings
dev.service.endpoint=http://developmentserver:8080
# User acceptance test settings
uat.service.endpoint=http://testserver:8080
One could have a class like: interface MyConfig extends Config {
@Key("${environment}.service.endpoint")
URL serviceEndpoint();
} Where |
This fits my use case perfectly. Thanks! |
You might appreciate - http://binkley.blogspot.com/2013/10/better-java-properties-handling.html. |
Yes, very much :) I noticed it the other day. |
Here's the kind of simple application I want to write, using OWNER API and https://github.com/binkley/binkley/blob/develop/guice/src/main/java/hm/binkley/inject/DemoMain.java Cheers, On Sun, Oct 13, 2013 at 9:25 PM, Luigi R. Viggiano <[email protected]
|
👍 (I'll work on this request asap: those day I started a new job contract, so I've been very busy) |
I'd rather write:
Than:
Especially as @key doesn't seem to like @key("${prefix}.baz"). (But please consider @Prefix first! Or @KeyPrefix!)
The text was updated successfully, but these errors were encountered: