Comments (7)
I like both, the @KeyPrefix and the variable expansion in the @Key
annotation. And they should be easy to implement.
from owner.
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 ${environment}
can be passed from outside at creation time (ConfigFactory) or by System properties, to have a single file that configures different deployment environments. The variable expansion already works in the @sources and this can be implemented using different files, but also giving the user the chance to have a single properties file defining all the environments could be good, from the user perspective.
from owner.
This fits my use case perfectly. Thanks!
from owner.
You might appreciate - http://binkley.blogspot.com/2013/10/better-java-properties-handling.html.
from owner.
Yes, very much :) I noticed it the other day.
from owner.
Here's the kind of simple application I want to write, using OWNER API and
jopt-simple, glued with Guice:
https://github.com/binkley/binkley/blob/develop/guice/src/main/java/hm/binkley/inject/DemoMain.java
Cheers,
--binkley
On Sun, Oct 13, 2013 at 9:25 PM, Luigi R. Viggiano <[email protected]
wrote:
Yes, very much :) I noticed ithttps://twitter.com/lviggiano/status/388639933524504576the other day :)
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/56#issuecomment-26215146
.
from owner.
👍 (I'll work on this request asap: those day I started a new job contract, so I've been very busy)
from owner.
Related Issues (20)
- CVE-2017-5637 (High) detected in zookeeper-3.4.8.jar - autoclosed HOT 1
- CVE-2019-0201 (Medium) detected in zookeeper-3.4.8.jar - autoclosed HOT 1
- CVE-2020-8908 (Low) detected in guava-27.0.1-jre.jar
- CVE-2018-10237 (Medium) detected in guava-16.0.1.jar - autoclosed HOT 1
- CVE-2023-2976 (High) detected in guava-27.0.1-jre.jar
- CVE-2021-4104 (High) detected in log4j-1.2.17.jar
- CVE-2014-0193 (Medium) detected in netty-3.7.0.Final.jar - autoclosed HOT 1
- CVE-2023-26464 (High) detected in log4j-1.2.17.jar
- CVE-2018-8012 (High) detected in zookeeper-3.4.8.jar - autoclosed HOT 1
- CVE-2023-44981 (Critical) detected in zookeeper-3.5.7.jar
- CVE-2019-17571 (Critical) detected in log4j-1.2.17.jar
- CVE-2020-9493 (Critical) detected in log4j-1.2.17.jar
- CVE-2015-2156 (High) detected in netty-3.7.0.Final.jar - autoclosed HOT 1
- CVE-2022-24823 (Medium) detected in netty-common-4.1.45.Final.jar
- CVE-2023-34462 (Medium) detected in netty-handler-4.1.45.Final.jar
- CVE-2021-37136 (High) detected in netty-codec-4.1.45.Final.jar
- CVE-2021-37137 (High) detected in netty-codec-4.1.45.Final.jar
- CVE-2020-11612 (High) detected in netty-codec-4.1.45.Final.jar
- CVE-2021-21290 (Medium) detected in netty-handler-4.1.45.Final.jar
- WS-2020-0408 (High) detected in netty-handler-4.1.45.Final.jar
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from owner.