You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@juneau.apache.org by ja...@apache.org on 2017/05/15 18:35:08 UTC
incubator-juneau-website git commit: Update config file section.
Repository: incubator-juneau-website
Updated Branches:
refs/heads/asf-site a61cb5e34 -> 824eb75b7
Update config file section.
Project: http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/commit/824eb75b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/tree/824eb75b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/diff/824eb75b
Branch: refs/heads/asf-site
Commit: 824eb75b717a5bdff789afca90641d9b3c861ed8
Parents: a61cb5e
Author: JamesBognar <ja...@apache.org>
Authored: Mon May 15 14:34:19 2017 -0400
Committer: JamesBognar <ja...@apache.org>
Committed: Mon May 15 14:35:06 2017 -0400
----------------------------------------------------------------------
content/about.html | 26 +++++++++++++++++---------
1 file changed, 17 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/824eb75b/content/about.html
----------------------------------------------------------------------
diff --git a/content/about.html b/content/about.html
index 6b09de1..60dabe4 100644
--- a/content/about.html
+++ b/content/about.html
@@ -1092,7 +1092,7 @@
<ck>aBoolean</ck> = <cv>true</cv>
<cc># An int array</cc>
- <ck>anIntArray</ck> = <cv>1,2,3</cv>
+ <ck>anIntArray</ck> = <cv>[1,2,3]</cv>
<cc># A POJO that can be converted from a String</cc>
<ck>aURL</ck> = <cv>http://foo </cv>
@@ -1147,6 +1147,10 @@
String firstArg = cf.getString(<js>"MySection/firstArg"</js>);
</p>
<p>
+ Values are LAX JSON (i.e. unquoted attributes, single quotes) except for top-level strings which are left unquoted.
+ Any parsable object types are supported as values (e.g. arrays, collections, beans, swappable objects, enums, etc...).
+ </p>
+ <p>
One of the more powerful aspects of the REST servlets is that you can pull values directly from
config files by using the <js>"$C"</js> variable in annotations.
<br>For example, the HTML stylesheet for your REST servlet can be defined in a config file like so:
@@ -1160,14 +1164,18 @@
<jk>public class</jk> MyResource <jk>extends</jk> RestServlet {
</p>
<p>
- The Config API also contains a listener API that allows you to, for example, reinitialize your REST
- resource if the config file changes, or listen for changes to particular sections or values.
- </p>
- <p>
- You can also modify INI files through the ConfigFile class (e.g. add/remove/modify sections and keys, add/remove comments and whitespace, etc...).
- <br>When using these APIs, you <b>DO NOT</b> lose formatting in your existing configuration file.
- All existing whitespace and comments are preserved for you!
+ Other features:
</p>
+ <ul>
+ <li>A listener API that allows you to, for example, reinitialize your REST resource if the config file
+ changes, or listen for changes to particular sections or values.
+ <li>Config files can be modified through the ConfigFile class (e.g. add/remove/modify sections and keys, add/remove comments and whitespace, etc...).
+ <br>When using these APIs, you <b>DO NOT</b> lose formatting in your existing configuration file.
+ All existing whitespace and comments are preserved for you!
+ <li>Config file sections can be used to directly populate beans.
+ <li>Config file sections can be accessed and manipulated through Java interface proxies.
+ </ul>
+
<br><hr>
<p class='info'>
<a class='doclink' href='http://juneau.incubator.apache.org/site/apidocs/overview-summary.html#Core.ConfigFile'>Additional Information - Config</a>
@@ -1212,7 +1220,7 @@
# 0 means try a random port.
# Default is Rest-Port setting in manifest file, or 8000.
# In this case, try port 10000, then try 3 random ports.</cc>
- <ck>port</ck> = <cv>10000, 0, 0, 0</cv>
+ <ck>port</ck> = <cv>[10000, 0, 0, 0]</cv>
<cc># A JSON map of servlet paths to servlet classes.
# Example: