tamaya-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anat...@apache.org
Subject incubator-tamaya git commit: TAMAYA-132: Removed @COnfigDefault (integrated with @Config): adapted docs.
Date Sun, 20 Dec 2015 08:05:45 GMT
Repository: incubator-tamaya
Updated Branches:
  refs/heads/master 4d51da2ed -> 1e9a4bdd6


TAMAYA-132: Removed @COnfigDefault (integrated with @Config): adapted docs.


Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/commit/1e9a4bdd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/tree/1e9a4bdd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/diff/1e9a4bdd

Branch: refs/heads/master
Commit: 1e9a4bdd6dd3709359188fbbefe5c39604a6163e
Parents: 4d51da2
Author: anatole <anatole@apache.org>
Authored: Sun Dec 20 09:05:39 2015 +0100
Committer: anatole <anatole@apache.org>
Committed: Sun Dec 20 09:05:39 2015 +0100

----------------------------------------------------------------------
 src/site/asciidoc/extensions/mod_injection.adoc | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/1e9a4bdd/src/site/asciidoc/extensions/mod_injection.adoc
----------------------------------------------------------------------
diff --git a/src/site/asciidoc/extensions/mod_injection.adoc b/src/site/asciidoc/extensions/mod_injection.adoc
index 11a654c..6c425eb 100644
--- a/src/site/asciidoc/extensions/mod_injection.adoc
+++ b/src/site/asciidoc/extensions/mod_injection.adoc
@@ -108,17 +108,17 @@ public class ConfiguredClass{
     // resolved by default, using property name, class and package name: foo.bar.ConfiguredClass.testProperty
     private String testProperty;
 
-    @Config({"a.b.c.key1","a.b.legacyKey",area1.key2"})
-    @DefaultValue("The current \\${JAVA_HOME} env property is ${env:JAVA_HOME}.")
+    // Trying to resolve mutiple keys, with a default value, if none could be resolved
+    @Config({"a.b.c.key1","a.b.legacyKey",area1.key2"}, defaultValue="The current \\${JAVA_HOME}
env property is ${env:JAVA_HOME}.")
     String value1;
 
-    // Using a (default) String -> Integer converter
+    // Typical case
     @Config("a.b.c.key2")
     private int value2;
 
     // resolved by default as foo.bar.ConfiguredClass.accessUrl
     // Using a (default) String -> URL converter
-    @DefaultValue("http://127.0.0.1:8080/res/api/v1/info.json")
+    @Config(defaultValue="http://127.0.0.1:8080/res/api/v1/info.json")
     private URL accessUrl;
 
     // Config injection disabled for this property
@@ -266,8 +266,7 @@ In the next example we explicitly define the property value:
 --------------------------------------------
 pubic class ConfiguredItem{
 
-  @Config({"aValue", "a.b.value","a.b.deprecated.value"})
-  @DefaultValue("${env:java.version}")
+  @Config({"aValue", "a.b.value","a.b.deprecated.value"}, defaultValue="${env:java.version}")
   private String aValue;
 }
 --------------------------------------------
@@ -281,8 +280,7 @@ commit new values exactly, when convenient for you.
 --------------------------------------------
 pubic class ConfiguredItem{
 
-  @Config({"aValue", "a.b.value","a.b.deprecated.value"})
-  @DefaultValue("${env:java.version}")
+  @Config({"aValue", "a.b.value","a.b.deprecated.value"}, defaultValue="${env:java.version}")
   private DynamicValue aValue;
 }
 --------------------------------------------


Mime
View raw message