This is an automated email from the ASF dual-hosted git repository.
jamesbognar pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/juneau-website.git
The following commit(s) were added to refs/heads/asf-site by this push:
new 7d66f53 Javadocs.
7d66f53 is described below
commit 7d66f53325c5429dd9745bc53827eae86f184904
Author: JamesBognar <[email protected]>
AuthorDate: Tue Dec 11 15:43:50 2018 -0500
Javadocs.
---
content/site/apidocs-8.0.0/allclasses-frame.html | 1 +
content/site/apidocs-8.0.0/allclasses-noframe.html | 1 +
...au-microservice-jetty-template.Installing.1.png | Bin 0 -> 156973 bytes
...au-microservice-jetty-template.Installing.2.png | Bin 0 -> 103957 bytes
...croservice-jetty-template.ResourceClasses.1.png | Bin 0 -> 42699 bytes
...uneau-microservice-jetty-template.Running.1.png | Bin 0 -> 67578 bytes
...croservice-jetty-template.UiCustomization.1.png | Bin 0 -> 56726 bytes
...juneau-microservice-jetty.ResourceClasses.1.png | Bin 0 -> 42699 bytes
.../juneau-microservice-jetty.Running.1.png | Bin 0 -> 67578 bytes
...juneau-microservice-jetty.UiCustomization.1.png | Bin 0 -> 56726 bytes
content/site/apidocs-8.0.0/index-all.html | 10 +
.../sample/{HelloWorldResource.html => App.html} | 126 ++---
.../microservice/sample/HelloWorldResource.html | 4 +-
.../juneau/microservice/sample/RootResources.html | 2 +-
.../juneau/microservice/sample/package-frame.html | 1 +
.../microservice/sample/package-summary.html | 8 +-
.../juneau/microservice/sample/package-tree.html | 1 +
content/site/apidocs-8.0.0/overview-summary.html | 625 +++------------------
content/site/apidocs-8.0.0/overview-tree.html | 1 +
content/site/apidocs-8.0.0/resources/docs.txt | 9 -
.../apidocs-8.0.0/resources/fragments/toc.html | 27 +-
.../org/apache/juneau/examples/rest/jetty/App.html | 3 +-
.../sample/{RootResources.html => App.html} | 61 +-
.../juneau/microservice/sample/RootResources.html | 2 +-
24 files changed, 173 insertions(+), 709 deletions(-)
diff --git a/content/site/apidocs-8.0.0/allclasses-frame.html
b/content/site/apidocs-8.0.0/allclasses-frame.html
index 7906114..acf22d6 100644
--- a/content/site/apidocs-8.0.0/allclasses-frame.html
+++ b/content/site/apidocs-8.0.0/allclasses-frame.html
@@ -37,6 +37,7 @@
<li><a href="org/apache/juneau/rest/util/AnnotationUtils.html" title="class in
org.apache.juneau.rest.util" target="classFrame">AnnotationUtils</a></li>
<li><a href="org/apache/juneau/examples/rest/jetty/App.html" title="class in
org.apache.juneau.examples.rest.jetty" target="classFrame">App</a></li>
<li><a href="org/apache/juneau/examples/rest/springboot/App.html" title="class
in org.apache.juneau.examples.rest.springboot" target="classFrame">App</a></li>
+<li><a href="org/apache/juneau/microservice/sample/App.html" title="class in
org.apache.juneau.microservice.sample" target="classFrame">App</a></li>
<li><a href="org/apache/juneau/dto/html5/Area.html" title="class in
org.apache.juneau.dto.html5" target="classFrame">Area</a></li>
<li><a href="org/apache/juneau/utils/Args.html" title="class in
org.apache.juneau.utils" target="classFrame">Args</a></li>
<li><a href="org/apache/juneau/svl/vars/ArgsVar.html" title="class in
org.apache.juneau.svl.vars" target="classFrame">ArgsVar</a></li>
diff --git a/content/site/apidocs-8.0.0/allclasses-noframe.html
b/content/site/apidocs-8.0.0/allclasses-noframe.html
index 4c9c32b..b39a33d 100644
--- a/content/site/apidocs-8.0.0/allclasses-noframe.html
+++ b/content/site/apidocs-8.0.0/allclasses-noframe.html
@@ -37,6 +37,7 @@
<li><a href="org/apache/juneau/rest/util/AnnotationUtils.html" title="class in
org.apache.juneau.rest.util">AnnotationUtils</a></li>
<li><a href="org/apache/juneau/examples/rest/jetty/App.html" title="class in
org.apache.juneau.examples.rest.jetty">App</a></li>
<li><a href="org/apache/juneau/examples/rest/springboot/App.html" title="class
in org.apache.juneau.examples.rest.springboot">App</a></li>
+<li><a href="org/apache/juneau/microservice/sample/App.html" title="class in
org.apache.juneau.microservice.sample">App</a></li>
<li><a href="org/apache/juneau/dto/html5/Area.html" title="class in
org.apache.juneau.dto.html5">Area</a></li>
<li><a href="org/apache/juneau/utils/Args.html" title="class in
org.apache.juneau.utils">Args</a></li>
<li><a href="org/apache/juneau/svl/vars/ArgsVar.html" title="class in
org.apache.juneau.svl.vars">ArgsVar</a></li>
diff --git
a/content/site/apidocs-8.0.0/doc-files/juneau-microservice-jetty-template.Installing.1.png
b/content/site/apidocs-8.0.0/doc-files/juneau-microservice-jetty-template.Installing.1.png
new file mode 100644
index 0000000..4ea5cec
Binary files /dev/null and
b/content/site/apidocs-8.0.0/doc-files/juneau-microservice-jetty-template.Installing.1.png
differ
diff --git
a/content/site/apidocs-8.0.0/doc-files/juneau-microservice-jetty-template.Installing.2.png
b/content/site/apidocs-8.0.0/doc-files/juneau-microservice-jetty-template.Installing.2.png
new file mode 100644
index 0000000..6e81fa5
Binary files /dev/null and
b/content/site/apidocs-8.0.0/doc-files/juneau-microservice-jetty-template.Installing.2.png
differ
diff --git
a/content/site/apidocs-8.0.0/doc-files/juneau-microservice-jetty-template.ResourceClasses.1.png
b/content/site/apidocs-8.0.0/doc-files/juneau-microservice-jetty-template.ResourceClasses.1.png
new file mode 100644
index 0000000..91f7275
Binary files /dev/null and
b/content/site/apidocs-8.0.0/doc-files/juneau-microservice-jetty-template.ResourceClasses.1.png
differ
diff --git
a/content/site/apidocs-8.0.0/doc-files/juneau-microservice-jetty-template.Running.1.png
b/content/site/apidocs-8.0.0/doc-files/juneau-microservice-jetty-template.Running.1.png
new file mode 100644
index 0000000..9d75bda
Binary files /dev/null and
b/content/site/apidocs-8.0.0/doc-files/juneau-microservice-jetty-template.Running.1.png
differ
diff --git
a/content/site/apidocs-8.0.0/doc-files/juneau-microservice-jetty-template.UiCustomization.1.png
b/content/site/apidocs-8.0.0/doc-files/juneau-microservice-jetty-template.UiCustomization.1.png
new file mode 100644
index 0000000..490cf48
Binary files /dev/null and
b/content/site/apidocs-8.0.0/doc-files/juneau-microservice-jetty-template.UiCustomization.1.png
differ
diff --git
a/content/site/apidocs-8.0.0/doc-files/juneau-microservice-jetty.ResourceClasses.1.png
b/content/site/apidocs-8.0.0/doc-files/juneau-microservice-jetty.ResourceClasses.1.png
new file mode 100644
index 0000000..91f7275
Binary files /dev/null and
b/content/site/apidocs-8.0.0/doc-files/juneau-microservice-jetty.ResourceClasses.1.png
differ
diff --git
a/content/site/apidocs-8.0.0/doc-files/juneau-microservice-jetty.Running.1.png
b/content/site/apidocs-8.0.0/doc-files/juneau-microservice-jetty.Running.1.png
new file mode 100644
index 0000000..9d75bda
Binary files /dev/null and
b/content/site/apidocs-8.0.0/doc-files/juneau-microservice-jetty.Running.1.png
differ
diff --git
a/content/site/apidocs-8.0.0/doc-files/juneau-microservice-jetty.UiCustomization.1.png
b/content/site/apidocs-8.0.0/doc-files/juneau-microservice-jetty.UiCustomization.1.png
new file mode 100644
index 0000000..490cf48
Binary files /dev/null and
b/content/site/apidocs-8.0.0/doc-files/juneau-microservice-jetty.UiCustomization.1.png
differ
diff --git a/content/site/apidocs-8.0.0/index-all.html
b/content/site/apidocs-8.0.0/index-all.html
index 84c5ee2..b3a2a36 100644
--- a/content/site/apidocs-8.0.0/index-all.html
+++ b/content/site/apidocs-8.0.0/index-all.html
@@ -1346,6 +1346,12 @@
</dd>
<dt><span class="memberNameLink"><a
href="org/apache/juneau/examples/rest/springboot/App.html#App--">App()</a></span>
- Constructor for class org.apache.juneau.examples.rest.springboot.<a
href="org/apache/juneau/examples/rest/springboot/App.html" title="class in
org.apache.juneau.examples.rest.springboot">App</a></dt>
<dd> </dd>
+<dt><a href="org/apache/juneau/microservice/sample/App.html" title="class in
org.apache.juneau.microservice.sample"><span
class="typeNameLink">App</span></a> - Class in <a
href="org/apache/juneau/microservice/sample/package-summary.html">org.apache.juneau.microservice.sample</a></dt>
+<dd>
+<div class="block">Entry-point for your microservice.</div>
+</dd>
+<dt><span class="memberNameLink"><a
href="org/apache/juneau/microservice/sample/App.html#App--">App()</a></span> -
Constructor for class org.apache.juneau.microservice.sample.<a
href="org/apache/juneau/microservice/sample/App.html" title="class in
org.apache.juneau.microservice.sample">App</a></dt>
+<dd> </dd>
<dt><span class="memberNameLink"><a
href="org/apache/juneau/BeanDictionaryList.html#append-java.lang.Class...-">append(Class<?>...)</a></span>
- Method in class org.apache.juneau.<a
href="org/apache/juneau/BeanDictionaryList.html" title="class in
org.apache.juneau">BeanDictionaryList</a></dt>
<dd>
<div class="block">Append one or more bean classes to this bean
dictionary.</div>
@@ -25305,6 +25311,10 @@
<dd>
<div class="block">Entry-point method.</div>
</dd>
+<dt><span class="memberNameLink"><a
href="org/apache/juneau/microservice/sample/App.html#main-java.lang.String:A-">main(String[])</a></span>
- Static method in class org.apache.juneau.microservice.sample.<a
href="org/apache/juneau/microservice/sample/App.html" title="class in
org.apache.juneau.microservice.sample">App</a></dt>
+<dd>
+<div class="block">Entry point method.</div>
+</dd>
<dt><span class="memberNameLink"><a
href="org/apache/juneau/dto/html5/Html.html#manifest-java.lang.String-">manifest(String)</a></span>
- Method in class org.apache.juneau.dto.html5.<a
href="org/apache/juneau/dto/html5/Html.html" title="class in
org.apache.juneau.dto.html5">Html</a></dt>
<dd>
<div class="block"><a class='doclink'
href='https://www.w3.org/TR/html5/semantics.html#attr-html-manifest'>manifest</a>
attribute.</div>
diff --git
a/content/site/apidocs-8.0.0/org/apache/juneau/microservice/sample/HelloWorldResource.html
b/content/site/apidocs-8.0.0/org/apache/juneau/microservice/sample/App.html
similarity index 52%
copy from
content/site/apidocs-8.0.0/org/apache/juneau/microservice/sample/HelloWorldResource.html
copy to
content/site/apidocs-8.0.0/org/apache/juneau/microservice/sample/App.html
index f13efb9..75c9d6d 100644
---
a/content/site/apidocs-8.0.0/org/apache/juneau/microservice/sample/HelloWorldResource.html
+++ b/content/site/apidocs-8.0.0/org/apache/juneau/microservice/sample/App.html
@@ -4,7 +4,7 @@
<head>
<!-- Generated by javadoc -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>HelloWorldResource (Apache Juneau 8.0.0)</title>
+<title>App (Apache Juneau 8.0.0)</title>
<link rel="stylesheet" type="text/css" href="../../../../../javadoc.css"
title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
</head>
@@ -12,14 +12,14 @@
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
- parent.document.title="HelloWorldResource (Apache Juneau 8.0.0)";
+ parent.document.title="App (Apache Juneau 8.0.0)";
}
}
catch(err) {
}
//-->
-var methods = {"i0":10};
-var tabs = {65535:["t0","All Methods"],2:["t2","Instance
Methods"],8:["t4","Concrete Methods"]};
+var methods = {"i0":9};
+var tabs = {65535:["t0","All Methods"],1:["t1","Static
Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
@@ -49,11 +49,11 @@ var activeTableTab = "activeTableTab";
<div class="subNav">
<ul class="navList">
<li>Prev Class</li>
-<li><a
href="../../../../../org/apache/juneau/microservice/sample/RootResources.html"
title="class in org.apache.juneau.microservice.sample"><span
class="typeNameLink">Next Class</span></a></li>
+<li><a
href="../../../../../org/apache/juneau/microservice/sample/HelloWorldResource.html"
title="class in org.apache.juneau.microservice.sample"><span
class="typeNameLink">Next Class</span></a></li>
</ul>
<ul class="navList">
-<li><a
href="../../../../../index.html?org/apache/juneau/microservice/sample/HelloWorldResource.html"
target="_top">Frames</a></li>
-<li><a href="HelloWorldResource.html" target="_top">No Frames</a></li>
+<li><a
href="../../../../../index.html?org/apache/juneau/microservice/sample/App.html"
target="_top">Frames</a></li>
+<li><a href="App.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
@@ -92,56 +92,29 @@ var activeTableTab = "activeTableTab";
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.juneau.microservice.sample</div>
-<h2 title="Class HelloWorldResource" class="title">Class
HelloWorldResource</h2>
+<h2 title="Class App" class="title">Class App</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a
href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true"
title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
-<li>javax.servlet.GenericServlet</li>
-<li>
-<ul class="inheritance">
-<li>javax.servlet.http.HttpServlet</li>
-<li>
-<ul class="inheritance">
-<li><a href="../../../../../org/apache/juneau/rest/RestServlet.html"
title="class in
org.apache.juneau.rest">org.apache.juneau.rest.RestServlet</a></li>
-<li>
-<ul class="inheritance">
-<li><a href="../../../../../org/apache/juneau/rest/BasicRestServlet.html"
title="class in
org.apache.juneau.rest">org.apache.juneau.rest.BasicRestServlet</a></li>
-<li>
-<ul class="inheritance">
-<li>org.apache.juneau.microservice.sample.HelloWorldResource</li>
-</ul>
-</li>
-</ul>
-</li>
-</ul>
-</li>
-</ul>
-</li>
+<li>org.apache.juneau.microservice.sample.App</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
-<dl>
-<dt>All Implemented Interfaces:</dt>
-<dd><a
href="http://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true"
title="class or interface in java.io">Serializable</a>, javax.servlet.Servlet,
javax.servlet.ServletConfig, <a
href="../../../../../org/apache/juneau/rest/BasicRestConfig.html"
title="interface in org.apache.juneau.rest">BasicRestConfig</a></dd>
-</dl>
<hr>
<br>
-<pre><a
href="../../../../../org/apache/juneau/rest/annotation/RestResource.html"
title="annotation in org.apache.juneau.rest.annotation">@RestResource</a>(<a
href="../../../../../org/apache/juneau/rest/annotation/RestResource.html#title--">title</a>="Hello
World example",
- <a
href="../../../../../org/apache/juneau/rest/annotation/RestResource.html#path--">path</a>="/helloworld",
- <a
href="../../../../../org/apache/juneau/rest/annotation/RestResource.html#description--">description</a>="Simplest
possible REST resource")
-public class <a
href="../../../../../src-html/org/apache/juneau/microservice/sample/HelloWorldResource.html#line.29">HelloWorldResource</a>
-extends <a href="../../../../../org/apache/juneau/rest/BasicRestServlet.html"
title="class in org.apache.juneau.rest">BasicRestServlet</a></pre>
-<div class="block">Sample REST resource that prints out a simple "Hello
world!" message.</div>
-<dl>
-<dt><span class="seeLabel">See Also:</span></dt>
-<dd><a
href="../../../../../serialized-form.html#org.apache.juneau.microservice.sample.HelloWorldResource">Serialized
Form</a></dd>
-</dl>
+<pre>public class <a
href="../../../../../src-html/org/apache/juneau/microservice/sample/App.html#line.24">App</a>
+extends <a
href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true"
title="class or interface in java.lang">Object</a></pre>
+<div class="block">Entry-point for your microservice.
+
+ <p>
+ The <a
href="../../../../../org/apache/juneau/microservice/jetty/JettyMicroservice.html"
title="class in
org.apache.juneau.microservice.jetty"><code>JettyMicroservice</code></a> class
will locate the <code>my-microservice.cfg</code> file in the home directory and
initialize
+ the resources and commands defined in that file.</div>
</li>
</ul>
</div>
@@ -160,7 +133,7 @@ extends <a
href="../../../../../org/apache/juneau/rest/BasicRestServlet.html" ti
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
-<td class="colOne"><code><span class="memberNameLink"><a
href="../../../../../org/apache/juneau/microservice/sample/HelloWorldResource.html#HelloWorldResource--">HelloWorldResource</a></span>()</code> </td>
+<td class="colOne"><code><span class="memberNameLink"><a
href="../../../../../org/apache/juneau/microservice/sample/App.html#App--">App</a></span>()</code> </td>
</tr>
</table>
</li>
@@ -172,47 +145,19 @@ extends <a
href="../../../../../org/apache/juneau/rest/BasicRestServlet.html" ti
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0"
summary="Method Summary table, listing methods, and an explanation">
-<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span
class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a
href="javascript:show(2);">Instance Methods</a></span><span
class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a
href="javascript:show(8);">Concrete Methods</a></span><span
class="tabEnd"> </span></span></caption>
+<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span
class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a
href="javascript:show(1);">Static Methods</a></span><span
class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a
href="javascript:show(8);">Concrete Methods</a></span><span
class="tabEnd"> </span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
-<td class="colFirst"><code><a
href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true"
title="class or interface in java.lang">String</a></code></td>
-<td class="colLast"><code><span class="memberNameLink"><a
href="../../../../../org/apache/juneau/microservice/sample/HelloWorldResource.html#sayHello--">sayHello</a></span>()</code>
-<div class="block">GET request handler.</div>
+<td class="colFirst"><code>static void</code></td>
+<td class="colLast"><code><span class="memberNameLink"><a
href="../../../../../org/apache/juneau/microservice/sample/App.html#main-java.lang.String:A-">main</a></span>(<a
href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true"
title="class or interface in java.lang">String</a>[] args)</code>
+<div class="block">Entry point method.</div>
</td>
</tr>
</table>
<ul class="blockList">
-<li class="blockList"><a
name="methods.inherited.from.class.org.apache.juneau.rest.BasicRestServlet">
-<!-- -->
-</a>
-<h3>Methods inherited from class org.apache.juneau.rest.<a
href="../../../../../org/apache/juneau/rest/BasicRestServlet.html" title="class
in org.apache.juneau.rest">BasicRestServlet</a></h3>
-<code><a
href="../../../../../org/apache/juneau/rest/BasicRestServlet.html#getOptions-org.apache.juneau.rest.RestRequest-">getOptions</a></code></li>
-</ul>
-<ul class="blockList">
-<li class="blockList"><a
name="methods.inherited.from.class.org.apache.juneau.rest.RestServlet">
-<!-- -->
-</a>
-<h3>Methods inherited from class org.apache.juneau.rest.<a
href="../../../../../org/apache/juneau/rest/RestServlet.html" title="class in
org.apache.juneau.rest">RestServlet</a></h3>
-<code><a
href="../../../../../org/apache/juneau/rest/RestServlet.html#destroy--">destroy</a>,
<a
href="../../../../../org/apache/juneau/rest/RestServlet.html#getContext--">getContext</a>,
<a
href="../../../../../org/apache/juneau/rest/RestServlet.html#getPath--">getPath</a>,
<a
href="../../../../../org/apache/juneau/rest/RestServlet.html#getProperties--">getProperties</a>,
<a
href="../../../../../org/apache/juneau/rest/RestServlet.html#getRequest--">getRequest</a>,
<a href="../../../../. [...]
-</ul>
-<ul class="blockList">
-<li class="blockList"><a
name="methods.inherited.from.class.javax.servlet.http.HttpServlet">
-<!-- -->
-</a>
-<h3>Methods inherited from class javax.servlet.http.HttpServlet</h3>
-<code>doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace,
getLastModified, service</code></li>
-</ul>
-<ul class="blockList">
-<li class="blockList"><a
name="methods.inherited.from.class.javax.servlet.GenericServlet">
-<!-- -->
-</a>
-<h3>Methods inherited from class javax.servlet.GenericServlet</h3>
-<code>getInitParameter, getInitParameterNames, getServletContext,
getServletInfo, getServletName, init</code></li>
-</ul>
-<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
@@ -233,13 +178,13 @@ extends <a
href="../../../../../org/apache/juneau/rest/BasicRestServlet.html" ti
<!-- -->
</a>
<h3>Constructor Detail</h3>
-<a name="HelloWorldResource--">
+<a name="App--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
-<h4>HelloWorldResource</h4>
-<pre>public <a
href="../../../../../src-html/org/apache/juneau/microservice/sample/HelloWorldResource.html#line.29">HelloWorldResource</a>()</pre>
+<h4>App</h4>
+<pre>public <a
href="../../../../../src-html/org/apache/juneau/microservice/sample/App.html#line.24">App</a>()</pre>
</li>
</ul>
</li>
@@ -250,19 +195,20 @@ extends <a
href="../../../../../org/apache/juneau/rest/BasicRestServlet.html" ti
<!-- -->
</a>
<h3>Method Detail</h3>
-<a name="sayHello--">
+<a name="main-java.lang.String:A-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
-<h4>sayHello</h4>
-<pre><a
href="../../../../../org/apache/juneau/rest/annotation/RestMethod.html"
title="annotation in org.apache.juneau.rest.annotation">@RestMethod</a>(<a
href="../../../../../org/apache/juneau/rest/annotation/RestMethod.html#method--">method</a>="GET",
- <a
href="../../../../../org/apache/juneau/rest/annotation/RestMethod.html#path--">path</a>="/*")
-public <a
href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true"
title="class or interface in java.lang">String</a> <a
href="../../../../../src-html/org/apache/juneau/microservice/sample/HelloWorldResource.html#line.37">sayHello</a>()</pre>
-<div class="block">GET request handler.</div>
+<h4>main</h4>
+<pre>public static void <a
href="../../../../../src-html/org/apache/juneau/microservice/sample/App.html#line.32">main</a>(<a
href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true"
title="class or interface in java.lang">String</a>[] args)
+ throws <a
href="http://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html?is-external=true"
title="class or interface in java.lang">Exception</a></pre>
+<div class="block">Entry point method.</div>
<dl>
-<dt><span class="returnLabel">Returns:</span></dt>
-<dd>The string "Hello world!"</dd>
+<dt><span class="paramLabel">Parameters:</span></dt>
+<dd><code>args</code> - Command line arguments.</dd>
+<dt><span class="throwsLabel">Throws:</span></dt>
+<dd><code><a
href="http://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html?is-external=true"
title="class or interface in java.lang">Exception</a></code></dd>
</dl>
</li>
</ul>
@@ -294,11 +240,11 @@ public <a
href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.h
<div class="subNav">
<ul class="navList">
<li>Prev Class</li>
-<li><a
href="../../../../../org/apache/juneau/microservice/sample/RootResources.html"
title="class in org.apache.juneau.microservice.sample"><span
class="typeNameLink">Next Class</span></a></li>
+<li><a
href="../../../../../org/apache/juneau/microservice/sample/HelloWorldResource.html"
title="class in org.apache.juneau.microservice.sample"><span
class="typeNameLink">Next Class</span></a></li>
</ul>
<ul class="navList">
-<li><a
href="../../../../../index.html?org/apache/juneau/microservice/sample/HelloWorldResource.html"
target="_top">Frames</a></li>
-<li><a href="HelloWorldResource.html" target="_top">No Frames</a></li>
+<li><a
href="../../../../../index.html?org/apache/juneau/microservice/sample/App.html"
target="_top">Frames</a></li>
+<li><a href="App.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
diff --git
a/content/site/apidocs-8.0.0/org/apache/juneau/microservice/sample/HelloWorldResource.html
b/content/site/apidocs-8.0.0/org/apache/juneau/microservice/sample/HelloWorldResource.html
index f13efb9..31f004d 100644
---
a/content/site/apidocs-8.0.0/org/apache/juneau/microservice/sample/HelloWorldResource.html
+++
b/content/site/apidocs-8.0.0/org/apache/juneau/microservice/sample/HelloWorldResource.html
@@ -48,7 +48,7 @@ var activeTableTab = "activeTableTab";
</div>
<div class="subNav">
<ul class="navList">
-<li>Prev Class</li>
+<li><a href="../../../../../org/apache/juneau/microservice/sample/App.html"
title="class in org.apache.juneau.microservice.sample"><span
class="typeNameLink">Prev Class</span></a></li>
<li><a
href="../../../../../org/apache/juneau/microservice/sample/RootResources.html"
title="class in org.apache.juneau.microservice.sample"><span
class="typeNameLink">Next Class</span></a></li>
</ul>
<ul class="navList">
@@ -293,7 +293,7 @@ public <a
href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.h
</div>
<div class="subNav">
<ul class="navList">
-<li>Prev Class</li>
+<li><a href="../../../../../org/apache/juneau/microservice/sample/App.html"
title="class in org.apache.juneau.microservice.sample"><span
class="typeNameLink">Prev Class</span></a></li>
<li><a
href="../../../../../org/apache/juneau/microservice/sample/RootResources.html"
title="class in org.apache.juneau.microservice.sample"><span
class="typeNameLink">Next Class</span></a></li>
</ul>
<ul class="navList">
diff --git
a/content/site/apidocs-8.0.0/org/apache/juneau/microservice/sample/RootResources.html
b/content/site/apidocs-8.0.0/org/apache/juneau/microservice/sample/RootResources.html
index 6e06e9c..a644981 100644
---
a/content/site/apidocs-8.0.0/org/apache/juneau/microservice/sample/RootResources.html
+++
b/content/site/apidocs-8.0.0/org/apache/juneau/microservice/sample/RootResources.html
@@ -131,7 +131,7 @@
</dl>
<hr>
<br>
-<pre><a
href="../../../../../org/apache/juneau/rest/annotation/RestResource.html"
title="annotation in org.apache.juneau.rest.annotation">@RestResource</a>(<a
href="../../../../../org/apache/juneau/rest/annotation/RestResource.html#path--">path</a>="/",
+<pre><a
href="../../../../../org/apache/juneau/rest/annotation/RestResource.html"
title="annotation in org.apache.juneau.rest.annotation">@RestResource</a>(<a
href="../../../../../org/apache/juneau/rest/annotation/RestResource.html#path--">path</a>="/*",
<a
href="../../../../../org/apache/juneau/rest/annotation/RestResource.html#title--">title</a>="My
Microservice",
<a
href="../../../../../org/apache/juneau/rest/annotation/RestResource.html#description--">description</a>="Top-level
resources page",
<a
href="../../../../../org/apache/juneau/rest/annotation/RestResource.html#htmldoc--">htmldoc</a>=,
diff --git
a/content/site/apidocs-8.0.0/org/apache/juneau/microservice/sample/package-frame.html
b/content/site/apidocs-8.0.0/org/apache/juneau/microservice/sample/package-frame.html
index 5df45e8..df382ee 100644
---
a/content/site/apidocs-8.0.0/org/apache/juneau/microservice/sample/package-frame.html
+++
b/content/site/apidocs-8.0.0/org/apache/juneau/microservice/sample/package-frame.html
@@ -13,6 +13,7 @@
<div class="indexContainer">
<h2 title="Classes">Classes</h2>
<ul title="Classes">
+<li><a href="App.html" title="class in org.apache.juneau.microservice.sample"
target="classFrame">App</a></li>
<li><a href="HelloWorldResource.html" title="class in
org.apache.juneau.microservice.sample"
target="classFrame">HelloWorldResource</a></li>
<li><a href="RootResources.html" title="class in
org.apache.juneau.microservice.sample"
target="classFrame">RootResources</a></li>
</ul>
diff --git
a/content/site/apidocs-8.0.0/org/apache/juneau/microservice/sample/package-summary.html
b/content/site/apidocs-8.0.0/org/apache/juneau/microservice/sample/package-summary.html
index 18955bc..f534847 100644
---
a/content/site/apidocs-8.0.0/org/apache/juneau/microservice/sample/package-summary.html
+++
b/content/site/apidocs-8.0.0/org/apache/juneau/microservice/sample/package-summary.html
@@ -86,12 +86,18 @@
</tr>
<tbody>
<tr class="altColor">
+<td class="colFirst"><a
href="../../../../../org/apache/juneau/microservice/sample/App.html"
title="class in org.apache.juneau.microservice.sample">App</a></td>
+<td class="colLast">
+<div class="block">Entry-point for your microservice.</div>
+</td>
+</tr>
+<tr class="rowColor">
<td class="colFirst"><a
href="../../../../../org/apache/juneau/microservice/sample/HelloWorldResource.html"
title="class in
org.apache.juneau.microservice.sample">HelloWorldResource</a></td>
<td class="colLast">
<div class="block">Sample REST resource that prints out a simple "Hello
world!" message.</div>
</td>
</tr>
-<tr class="rowColor">
+<tr class="altColor">
<td class="colFirst"><a
href="../../../../../org/apache/juneau/microservice/sample/RootResources.html"
title="class in org.apache.juneau.microservice.sample">RootResources</a></td>
<td class="colLast">
<div class="block">Root microservice page.</div>
diff --git
a/content/site/apidocs-8.0.0/org/apache/juneau/microservice/sample/package-tree.html
b/content/site/apidocs-8.0.0/org/apache/juneau/microservice/sample/package-tree.html
index 189941b..14abc52 100644
---
a/content/site/apidocs-8.0.0/org/apache/juneau/microservice/sample/package-tree.html
+++
b/content/site/apidocs-8.0.0/org/apache/juneau/microservice/sample/package-tree.html
@@ -80,6 +80,7 @@
<ul>
<li type="circle">java.lang.<a
href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true"
title="class or interface in java.lang"><span
class="typeNameLink">Object</span></a>
<ul>
+<li type="circle">org.apache.juneau.microservice.sample.<a
href="../../../../../org/apache/juneau/microservice/sample/App.html"
title="class in org.apache.juneau.microservice.sample"><span
class="typeNameLink">App</span></a></li>
<li type="circle">javax.servlet.GenericServlet (implements java.io.<a
href="http://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true"
title="class or interface in java.io">Serializable</a>, javax.servlet.Servlet,
javax.servlet.ServletConfig)
<ul>
<li type="circle">javax.servlet.http.HttpServlet
diff --git a/content/site/apidocs-8.0.0/overview-summary.html
b/content/site/apidocs-8.0.0/overview-summary.html
index 011434b..925356b 100644
--- a/content/site/apidocs-8.0.0/overview-summary.html
+++ b/content/site/apidocs-8.0.0/overview-summary.html
@@ -1022,30 +1022,15 @@
<li><p class='new'><a class='doclink'
href='#juneau-microservice-jetty.UiCustomization'>UI Customization</a></p>
<li><p class='new'><a class='doclink'
href='#juneau-microservice-jetty.Extending'>Extending JettyMicroservice</a></p>
</ol>
- <li><p class='toc2 todo'><a class='doclink'
href='#juneau-microservice-jetty-template'>juneau-microservice-jetty-template</a></p>
+ <li><p class='toc2 new'><a class='doclink'
href='#juneau-microservice-jetty-template'>juneau-microservice-jetty-template</a></p>
<ol>
- <li><p class='todo'><a class='doclink'
href='#juneau-microservice-jetty-template.Introduction'>Microservice
Introduction</a></p>
- <li><p class='todo'><a class='doclink'
href='#juneau-microservice-jetty-template.GettingStarted'>Getting
Started</a></p>
+ <li><p class='updated'><a class='doclink'
href='#juneau-microservice-jetty-template.Introduction'>Microservice
Introduction</a></p>
+ <li><p class='updated'><a class='doclink'
href='#juneau-microservice-jetty-template.GettingStarted'>Getting
Started</a></p>
<ol>
- <li><p class=''><a class='doclink'
href='#juneau-microservice-jetty-template.GettingStarted.Installing'>Installing
in Eclipse</a></p>
- <li><p class=''><a class='doclink'
href='#juneau-microservice-jetty-template.GettingStarted.Running'>Running in
Eclipse</a></p>
- <li><p class=''><a class='doclink'
href='#juneau-microservice-jetty-template.GettingStarted.Building'>Building and
Running from Command-Line</a></p>
+ <li><p class='updated'><a class='doclink'
href='#juneau-microservice-jetty-template.GettingStarted.Installing'>Installing
in Eclipse</a></p>
+ <li><p class='updated'><a class='doclink'
href='#juneau-microservice-jetty-template.GettingStarted.Running'>Running in
Eclipse</a></p>
+ <li><p class='updated'><a class='doclink'
href='#juneau-microservice-jetty-template.GettingStarted.Building'>Building and
Running from Command-Line</a></p>
</ol>
- <li><p class='todo'><a class='doclink'
href='#juneau-microservice-jetty-template.Manifest'>Manifest File</a></p>
- <ol>
- <li><p class=''><a class='doclink'
href='#juneau-microservice-jetty-template.Manifest.ManifestApi'>Manifest
API</a></p>
- </ol>
- <li><p class='todo'><a class='doclink'
href='#juneau-microservice-jetty-template.Config'>Config</a></p>
- <ol>
- <li><p class=''><a class='doclink'
href='#juneau-microservice-jetty-template.Config.ConfigApi'>Config File
API</a></p>
- </ol>
- <li><p class='todo'><a class='doclink'
href='#juneau-microservice-jetty-template.ResourceClasses'>Resource
Classes</a></p>
- <li><p class='todo'><a class='doclink'
href='#juneau-microservice-jetty-template.PredefinedResourceClasses'>Predefined
Resource Classes</a></p>
- <li><p class='todo'><a class='doclink'
href='#juneau-microservice-jetty-template.RestMicroservice'>RestMicroservice</a></p>
- <ol>
- <li><p class=''><a class='doclink'
href='#juneau-microservice-jetty-template.RestMicroservice.Extending'>Extending
RestMicroservice</a></p>
- </ol>
- <li><p class='todo'><a class='doclink'
href='#juneau-microservice-jetty-template.UiCustomization'>UI
Customization</a></p>
</ol>
<li><p class='toc2 '><a class='doclink'
href='#juneau-examples-core'>juneau-examples-core</a></p>
<ol>
@@ -25097,7 +25082,7 @@
<p class='bpcode w800'>
http://localhost:10000
</p>
-<img class='bordered w800'
src='doc-files/juneau-microservice-server.Running.1.png'>
+<img class='bordered w800'
src='doc-files/juneau-microservice-jetty.Running.1.png'>
<ul class='spaced-list'>
<li>
The </l>title</l> and <l>description</l> annotations define the titles
on the page.
@@ -25118,7 +25103,7 @@
<p class='bpcode w800'>
http://localhost:10000/helloWorld
</p>
-<img class='bordered w800'
src='doc-files/juneau-microservice-server.ResourceClasses.1.png'>
+<img class='bordered w800'
src='doc-files/juneau-microservice-jetty.ResourceClasses.1.png'>
<p>
...which is generated by this class...
</p>
@@ -25531,7 +25516,7 @@
The Microservice project contains a <code>files/htdocs</code> folder with
predefined stylesheets and
images.
</p>
-<img style='width:200px'
src='doc-files/juneau-microservice.UiCustomization.1.png'>
+<img style='width:200px'
src='doc-files/juneau-microservice-jetty.UiCustomization.1.png'>
<p>
These files can be used to tailor the look-and-feel of your microservice.
</p>
@@ -25720,45 +25705,35 @@
<!--
====================================================================================================
-->
-<h2 class='topic todo' onclick='toggle(this)'><a
href='#juneau-microservice-jetty-template'
id='juneau-microservice-jetty-template'>13 -
juneau-microservice-jetty-template</a></h2>
+<h2 class='topic new' onclick='toggle(this)'><a
href='#juneau-microservice-jetty-template'
id='juneau-microservice-jetty-template'>13 -
juneau-microservice-jetty-template</a></h2>
<div class='topic'><!-- START: 13 - juneau-microservice-jetty-template -->
<h5 class='figure'>Maven Dependency</h5>
<p class='bpcode w500'>
<xt><dependency></xt>
<xt><groupId></xt>org.apache.juneau<xt></groupId></xt>
-
<xt><artifactId></xt>juneau-microservice-server<xt></artifactId></xt>
+
<xt><artifactId></xt>juneau-microservice-jetty-template<xt></artifactId></xt>
<xt><version></xt>8.0.0<xt></version></xt>
<xt></dependency></xt>
</p>
-<h5 class='figure'>Java Library</h5>
-<p class='bpcode w500'>
- juneau-microservice-server-8.0.0.jar
-</p>
-
-<h5 class='figure'>OSGi Module</h5>
-<p class='bpcode w500'>
- org.apache.juneau.microservice.jetty.server_8.0.0.jar
-</p>
-
<h5 class='figure'>Microservice Starter Project</h5>
<p class='bpcode w500'>
- my-microservice.zip
+ my-microservice-jetty-8.0.0.zip
</p>
<p>
- Juneau Microservice is an API for creating stand-alone executable jars that
can be used to
- start lightweight configurable REST interfaces with all the power of the
Juneau REST server and client APIs.
+ The <l>my-microservice-jetty.zip</l> file is a predefined starter Eclipse
project for developing
+ REST microservices using the <a class='doclink'
href='#juneau-microservice-jetty'>Overview > juneau-microservice-jetty</a>
package.
</p>
<!--
====================================================================================================
-->
-<h3 class='topic todo' onclick='toggle(this)'><a
href='#juneau-microservice-jetty-template.Introduction'
id='juneau-microservice-jetty-template.Introduction'>13.1 - Microservice
Introduction</a></h3>
+<h3 class='topic updated' onclick='toggle(this)'><a
href='#juneau-microservice-jetty-template.Introduction'
id='juneau-microservice-jetty-template.Introduction'>13.1 - Microservice
Introduction</a></h3>
<div class='topic'><!-- START: 13.1 -
juneau-microservice-jetty-template.Introduction -->
<p>
The Microservice API consists of a combination of the Juneau Core, Server,
and Client APIs and an embedded
Eclipse Jetty Servlet Container.
- <br>It includes all libraries needed to execute in a Java 1.7+ environment.
+ <br>It includes all libraries needed to execute in a Java 1.8+ environment.
</p>
<p>
Features include:
@@ -25767,7 +25742,7 @@
<li>
An out-of-the-box zipped Eclipse project to get started quickly.
<li>
- Packaged as a simple executable jar and configuration file.
+ Buildable as a simple executable jar and configuration file.
<li>
All the power of the Juneau ecosystem for defining REST servlets and
clients with the ability to
serialize and parse POJOs as HTML, JSON, XML, RDF, URL-Encoding, and
others.
@@ -25779,57 +25754,61 @@
<li>
Predefined REST resources for configuring microservice and accessing log
files.
</ul>
-<p>
- The <code>juneau-microservice-server</code> library consists of the
following classes:
-</p>
-<ul class='doctree'>
- <li class='jac'>
- <a href="org/apache/juneau/microservice/Microservice.html" title="class
in org.apache.juneau.microservice"><code>Microservice</code></a>
- - Defines basic lifecycle methods for microservices in general.
- <ul>
- <li class='jc'>
- <code>RestMicroservice</code>
- - Defines additional lifecycle methods for REST microservices.
- <br>Starts up an externally-configured Jetty server, registers
servlets, and sets up
- other features such as logging.
- </ul>
-</ul>
</div><!-- END: 13.1 - juneau-microservice-jetty-template.Introduction -->
<!--
====================================================================================================
-->
-<h3 class='topic todo' onclick='toggle(this)'><a
href='#juneau-microservice-jetty-template.GettingStarted'
id='juneau-microservice-jetty-template.GettingStarted'>13.2 - Getting
Started</a></h3>
+<h3 class='topic updated' onclick='toggle(this)'><a
href='#juneau-microservice-jetty-template.GettingStarted'
id='juneau-microservice-jetty-template.GettingStarted'>13.2 - Getting
Started</a></h3>
<div class='topic'><!-- START: 13.2 -
juneau-microservice-jetty-template.GettingStarted -->
<p>
- The <l>my-microservice.zip</l> file is a zipped eclipse project that
includes everything you
+ The <l>my-microservice-jetty.zip</l> file is a zipped eclipse project that
includes everything you
need to create a REST microservice in an Eclipse workspace.
</p>
<!--
====================================================================================================
-->
-<h4 class='topic ' onclick='toggle(this)'><a
href='#juneau-microservice-jetty-template.GettingStarted.Installing'
id='juneau-microservice-jetty-template.GettingStarted.Installing'>13.2.1 -
Installing in Eclipse</a></h4>
+<h4 class='topic updated' onclick='toggle(this)'><a
href='#juneau-microservice-jetty-template.GettingStarted.Installing'
id='juneau-microservice-jetty-template.GettingStarted.Installing'>13.2.1 -
Installing in Eclipse</a></h4>
<div class='topic'><!-- START: 13.2.1 -
juneau-microservice-jetty-template.GettingStarted.Installing -->
<p>
Follow these instructions to create a new template project in Eclipse.
</p>
<ol class='spaced-list'>
<li>
- Download the latest microservice-project zip file (e.g.
<l>my-microservice.zip</l>).
+ Download the latest <l>my-jetty-microservice.zip</l> file.
<li>
In your Eclipse workspace, go to <b>File -> Import -> General
-> Existing Projects into Workspace</b>
and select the zip file and click <b>Finish</b>.
<br><br>
- <img class='bordered'
src='doc-files/juneau-microservice-server.Installing.1.png' style='width:549px'>
+ <img class='bordered'
src='doc-files/juneau-microservice-jetty-template.Installing.1.png'
style='width:549px'>
<li>
In your workspace, you should now see the following project:
<br><br>
- <img class='bordered'
src='doc-files/juneau-microservice-server.Installing.2.png' style='width:299px'>
+ <img class='bordered'
src='doc-files/juneau-microservice-jetty-template.Installing.2.png'
style='width:400px'>
</ol>
<p>
The important elements in this project are:
</p>
<ul class='spaced-list'>
<li>
+ <l>App.java</l> - The entry point.
+ <br>This class creates and starts our microservice:
+ <br><br>
+ <p class='bcode w800'>
+ <jk>public class</jk> App {
+
+ <jk>public static void</jk> main(String[] args) <jk>throws</jk>
Exception {
+ JettyMicroservice
+ .<jsm>create</jsm>()
+ .args(args)
+ .servlet(RootResources.<jk>class</jk>)
+ .build()
+ .start()
+ .startConsole()
+ .join();
+ }
+ }
+ </p>
+ <li>
<l>RootResources.java</l> - The top-level REST resource.
<br>This class routes HTTP requests to child resources:
<br><br>
@@ -25892,17 +25871,34 @@
# jetty.xml file as "$S{availablePort}" (assuming resolveVars is
enabled).</cc>
<ck>port</ck> = <cv>10000,0,0,0</cv>
+ <cc># Optionally specify your servlets here:
+ #servlets = org.apache.juneau.microservice.sample.RootResources</cc>
+
<cc>#=======================================================================================================================
# REST settings
#=======================================================================================================================</cc>
<cs>[REST]</cs>
- <cc># Stylesheet to use for HTML views.
- # The default options are:
- # - servlet:/styles/juneau.css
- # - servlet:/styles/devops.css
- # Other stylesheets can be referenced relative to the servlet package or
working directory.</cc>
- <ck>stylesheet</ck> = <cv>servlet:/styles/devops.css</cv>
+ <cc># URL mappings to static files in the working directory or
classpath.</cc>
+ <ck>staticFiles</ck> = htdocs:files/htdocs
+
+ <cc># Stylesheet to use for HTML views.</cc>
+ <ck>theme</ck> = <cv>servlet:/htdocs/themes/devops.css</cv>
+
+ <ck>headerIcon</ck> = <cv>servlet:/htdocs/images/juneau.png</cv>
+ <ck>headerLink</ck> = <cv>http://juneau.apache.org</cv>
+ <ck>footerIcon</ck> = <cv>servlet:/htdocs/images/asf.png</cv>
+ <ck>footerLink</ck> = <cv>http://www.apache.org</cv>
+
+ <ck>favicon</ck> = <cv>$C{REST/headerIcon}</cv>
+ <ck>header</ck> =
+ <cv><a href='$U{$C{REST/headerLink}}'>
+ <img src='$U{$C{REST/headerIcon}}'
style='position:absolute;top:5;right:5;background-color:transparent;height:30px'/>
+ </a></cv>
+ <ck>footer</ck> =
+ <cv><a href='$U{$C{REST/footerLink}}'>
+ <img src='$U{$C{REST/footerIcon}}'
style='float:right;padding-right:20px;height:32px'/>
+ </a></cv>
<cc>#=======================================================================================================================
# Console settings
@@ -25971,10 +25967,11 @@
<xt><New</xt> <xa>id</xa>=<xs>"context"</xs>
<xa>class</xa>=<xs>"org.eclipse.jetty.servlet.ServletContextHandler"</xs><xt>></xt>
<xt><Set</xt>
<xa>name</xa>=<xs>"contextPath"</xs><xt>>/</Set></xt>
- <xt><Call</xt> <xa>name</xa>=<xs>"addServlet"</xs><xt>></xt>
-
<xt><Arg></xt>org.apache.juneau.microservice.sample.RootResources<xt></Arg></xt>
- <xt><Arg></xt>/*<xt></Arg></xt>
- <xt></Call></xt>
+ <xc><!-- Optionally specify your servlets here -->
+ <!--Call name="addServlet">
+
<Arg>org.apache.juneau.microservice.sample.RootResources</Arg>
+ <Arg>/*</Arg>
+ </Call--></xc>
<xt><Set</xt> <xa>name</xa>=<xs>"sessionHandler"</xs><xt>></xt>
<xt><New</xt>
<xa>class</xa>=<xs>"org.eclipse.jetty.server.session.SessionHandler"</xs><xt>/></xt>
<xt></Set></xt>
@@ -26022,7 +26019,7 @@
<!--
====================================================================================================
-->
-<h4 class='topic ' onclick='toggle(this)'><a
href='#juneau-microservice-jetty-template.GettingStarted.Running'
id='juneau-microservice-jetty-template.GettingStarted.Running'>13.2.2 - Running
in Eclipse</a></h4>
+<h4 class='topic updated' onclick='toggle(this)'><a
href='#juneau-microservice-jetty-template.GettingStarted.Running'
id='juneau-microservice-jetty-template.GettingStarted.Running'>13.2.2 - Running
in Eclipse</a></h4>
<div class='topic'><!-- START: 13.2.2 -
juneau-microservice-jetty-template.GettingStarted.Running -->
<p>
The <l>my-microservice.launch</l> file is already provided to allow you to
quickly start
@@ -26050,7 +26047,7 @@
<p class='bpcode w400'>
http://localhost:10000
</p>
-<img class='bordered w400'
src='doc-files/juneau-microservice-server.Running.1.png'>
+<img class='bordered w400'
src='doc-files/juneau-microservice-jetty-template.Running.1.png'>
<p>
You have started a REST interface on port 10000.
<br>You can enter the command <code>exit</code> to shut it down.
@@ -26059,7 +26056,7 @@
<!--
====================================================================================================
-->
-<h4 class='topic ' onclick='toggle(this)'><a
href='#juneau-microservice-jetty-template.GettingStarted.Building'
id='juneau-microservice-jetty-template.GettingStarted.Building'>13.2.3 -
Building and Running from Command-Line</a></h4>
+<h4 class='topic updated' onclick='toggle(this)'><a
href='#juneau-microservice-jetty-template.GettingStarted.Building'
id='juneau-microservice-jetty-template.GettingStarted.Building'>13.2.3 -
Building and Running from Command-Line</a></h4>
<div class='topic'><!-- START: 13.2.3 -
juneau-microservice-jetty-template.GettingStarted.Building -->
<p>
The <l>pom.xml</l> file is a basic Maven build script for creating your
microservice
@@ -26077,7 +26074,6 @@
<ul>
<li><code>my-microservice-1.0.jar</code>
<li><code>my-microservice.cfg</code>
- <li><code>jetty.xml</code>
</ul>
<p>
To start from a command line, run the following command from inside your
<code>target</code> directory:
@@ -26105,475 +26101,6 @@
</p>
</div><!-- END: 13.2.3 -
juneau-microservice-jetty-template.GettingStarted.Building -->
</div><!-- END: 13.2 - juneau-microservice-jetty-template.GettingStarted -->
-
-<!--
====================================================================================================
-->
-
-<h3 class='topic todo' onclick='toggle(this)'><a
href='#juneau-microservice-jetty-template.Manifest'
id='juneau-microservice-jetty-template.Manifest'>13.3 - Manifest File</a></h3>
-<div class='topic'><!-- START: 13.3 -
juneau-microservice-jetty-template.Manifest -->
-<p>
- The generated <l>META-INF/MANIFEST.MF</l> file is used to describe the
microservice.
- <br>If you open it, you'll see the following:
-</p>
-<p class='bpcode w800'>
- <mk>Main-Class</mk>:
<mv>org.apache.juneau.microservice.jetty.RestMicroservice</mv>
- <mk>Main-ConfigFile</mk>: <mv>my-microservice.cfg</mv>
-<p>
- The <mk>Main-Class</mk> entry is the standard manifest entry describing the
entry point for the executable jar.
- <br>In most cases, this value will always be
<l>org.apache.juneau.microservice.jetty.RestMicroservice</l>.
- <br>However, it is possible to extend this class or implement your own
microservice, in which case you'll need
- to modify this value to point to the new class.
-</p>
-<p>
- The <mk>Main-ConfigFile</mk> entry points to the location of an external
configuration file for our microservice.
-</p>
-<p>
- In addition to these predefined manifest entries, you can add your own
particular entries to the manifest file
- and access them through the Manifest API described next.
-</p>
-
-<!--
====================================================================================================
-->
-
-<h4 class='topic ' onclick='toggle(this)'><a
href='#juneau-microservice-jetty-template.Manifest.ManifestApi'
id='juneau-microservice-jetty-template.Manifest.ManifestApi'>13.3.1 - Manifest
API</a></h4>
-<div class='topic'><!-- START: 13.3.1 -
juneau-microservice-jetty-template.Manifest.ManifestApi -->
-<p>
- The <a
href="org/apache/juneau/microservice/Microservice.html#getManifest--"><code>Microservice.getManifest()</code></a>
method is a static method that
- can be used to retrieve the manifest file as a <a
href="org/apache/juneau/utils/ManifestFile.html" title="class in
org.apache.juneau.utils"><code>ManifestFile</code></a>.
-</p>
-<p class='bpcode w800'>
- <jc>// Get Main-Class from manifest file.</jc>
- String mainClass =
Microservice.<jsm>getInstance</jsm>().getManifest().getString(<js>"Main-Class"</js>,
<js>"unknown"</js>);
-</p>
-<p>
- The <a href="org/apache/juneau/utils/ManifestFile.html" title="class in
org.apache.juneau.utils"><code>ManifestFile</code></a> class extends <a
href="org/apache/juneau/ObjectMap.html" title="class in
org.apache.juneau"><code>ObjectMap</code></a>,
- making it possible to retrieve entries as a wide variety of object types
such as java primitives, arrays, collections,
- maps, or even POJOs serialized as JSON.
-</p>
-</div><!-- END: 13.3.1 -
juneau-microservice-jetty-template.Manifest.ManifestApi -->
-</div><!-- END: 13.3 - juneau-microservice-jetty-template.Manifest -->
-
-<!--
====================================================================================================
-->
-
-<h3 class='topic todo' onclick='toggle(this)'><a
href='#juneau-microservice-jetty-template.Config'
id='juneau-microservice-jetty-template.Config'>13.4 - Config</a></h3>
-<div class='topic'><!-- START: 13.4 -
juneau-microservice-jetty-template.Config -->
-<p>
- The microservice config file is an external INI-style configuration file
that is used to configure
- your microservice.
-</p>
-<h5 class='section'>See Also:</h5>
-<ul class='doctree'>
- <li class='link'><a class='doclink' href='#juneau-config'>Overview >
juneau-config</a>
-</ul>
-
-<!--
====================================================================================================
-->
-
-<h4 class='topic ' onclick='toggle(this)'><a
href='#juneau-microservice-jetty-template.Config.ConfigApi'
id='juneau-microservice-jetty-template.Config.ConfigApi'>13.4.1 - Config File
API</a></h4>
-<div class='topic'><!-- START: 13.4.1 -
juneau-microservice-jetty-template.Config.ConfigApi -->
-<p>
- There are 3 primary ways of getting access to the config file.
-</p>
-<ul class='doctree'>
- <li class='jm'><a
href="org/apache/juneau/microservice/Microservice.html#getConfig--"><code>Microservice.getConfig()</code></a>
- <br>Any <a class='doclink'
href='#DefaultRestSvlVariables'>initialization-time variables</a> can be used.
- <li class='jm'><a
href="org/apache/juneau/rest/RestContext.html#getConfig--"><code>RestContext.getConfig()</code></a>
- <br>Any <a class='doclink'
href='#DefaultRestSvlVariables'>initialization-time variables</a> can be used.
- <h5 class='figure'>Example usage:</h5>
- <p class='bcode w800'>
- <cc>#-------------------------------</cc>
- <cc># Properties for MyHelloResource </cc>
- <cc>#-------------------------------</cc>
- <cs>[MyHelloResource]</cs>
- <ck>greeting</ck> = <cv>Hello world!</cv>
- </p>
- <p class='bcode w800'>
- <ja>@RestResource</ja>(...)
- <jk>public class</jk> MyHelloResource <jk>extends</jk> BasicRestServlet {
- <jc>// Access config file when initializing fields.</jc>
- <jk>private</jk> String greeting =
getConfig().getString(<js>"MyHelloResource/greeting"</js>);
-
- <jc>// Or access config file in servlet init method.</jc>
- <ja>@Override</ja> <jc>/* Servlet */</jc>
- <jk>public void</jk> init() {
- String greeting =
getConfig().getString(<js>"MyHelloResource/greeting"</js>);
- }
- }
- </p>
- <p>
- Additional user-defined variables can be defined at this level by
adding a
- <a
href="org/apache/juneau/rest/annotation/HookEvent.html#INIT"><code>HookEvent.INIT</code></a>
hook method
- and using the <a
href="org/apache/juneau/rest/RestContextBuilder.html#vars-java.lang.Class...-"><code>RestContextBuilder.vars(Class...)</code></a>
method.
- </p>
- <li class='jm'>
- <a
href="org/apache/juneau/rest/RestRequest.html#getConfig--"><code>RestRequest.getConfig()</code></a>
- - An instance method to access it from inside a REST method.
- <br>Any <a class='doclink'
href='#DefaultRestSvlVariables'>initialization-time or request-time
variables</a> can be used.
-
- <h5 class='figure'>Example usage:</h5>
- <p class='bcode w800'>
- <cc>#-----------------------------</cc>
- <cc># Contents of microservice.cfg </cc>
- <cc>#-----------------------------</cc>
- <cs>[MyHelloResource]</cs>
- <ck>greeting</ck> = <cv>Hello $RP{person}!</cv>
- <ck>localizedGreeting</ck> = <cv>$L{HelloMessage,$RP{person}}</cv>
- </p>
- <p class='bcode w800'>
- <cc>#---------------------------------</cc>
- <cc># Contents of MyHelloResource.java </cc>
- <cc>#---------------------------------</cc>
- <ja>@RestResource</ja>(
- path=<js>"/hello"</js>,
- messages=<js>"nls/Messages"</js>,
- ...
- )
- <jk>public class</jk> MyHelloResource <jk>extends</jk> BasicRestServlet {
-
- <jd>/** Standard hello message. */</jd>
- <ja>@RestMethod</ja>(name=<jsf>GET</jsf>, path=<js>"/{person}"</js>)
- <jk>public</jk> String sayHello(RestRequest req) {
- <jk>return</jk>
req.getConfig().getString(<js>"MyHelloResource/greeting"</js>);
- }
-
- <jd>/** Hello message in users language. */</jd>
- <ja>@RestMethod</ja>(name=<jsf>GET</jsf>,
path=<js>"/localized/{person}"</js>)
- <jk>public</jk> String sayLocalizedHello(RestRequest req) {
- <jk>return</jk>
req.getConfig().getString(<js>"MyHelloResource/localizedGreeting"</js>);
- }
- }
- </p>
- <p class='bcode w800'>
- <cc>#---------------------------------------</cc>
- <cc># Contents of nls/Messages_en.properties </cc>
- <cc>#---------------------------------------</cc>
- <ck>MyHelloResource.HelloMessage</ck> = <cv>Hello {0}!</cv>
- </p>
- <p>
- Additional user-defined variables can be defined at this level by
overriding the
- <a
href="org/apache/juneau/rest/RestContextBuilder.html#vars-java.lang.Class...-"><code>RestContextBuilder.vars(Class...)</code></a>
method.
- </p>
-</ul>
-<p>
- That <l>sayLocalizedHello()</l> example might need some explanation since
there's a lot going on there.
- <br>Here's what happens when an HTTP call is made to <l>GET
/hello/localized/Bob</l>:
-</p>
-<ol class='spaced-list'>
- <li>
- The HTTP call matches the <l>/hello</l> path on the
<l>MyHelloResource</l> class.
- <li>
- The HTTP call matches the <l>/localized/{person}</l> path on the
<l>sayLocalizedHello()</l> method.
- <li>
- The request attribute <l>person</l> gets assigned the value <l>"Bob"</l>.
- <li>
- The call to
<l>req.getConfig().getString("MyHelloResource/localizedGreeting")</l>
- finds the value <l>"$L{HelloMessage,$RP{person}}"</l>.
- <li>
- The arguments in the <l>$L{}</l> variable get resolved, resulting in
<l>"$L{HelloMessage,Bob}"</l>.
- <li>
- The <l>$L{}</l> variable gets resolved to the message <l>"Hello
{0}!"</l> in the localized properties
- file of the servlet based on the <l>Accept-Language</l> header on the
request.
- <li>
- The arguments get replaced in the message resulting in <l>"Hello
Bob!"</l>.
- <li>
- The resulting message <l>"Hello Bob!"</l> is returned as a POJO to be
serialized to whatever content
- type was specified on the <l>Accept</l> header on the request.
-</ol>
-<p>
- This particular example is needlessly complex, but it gives an idea of how
variables can be used
- recursively to produce sophisticated results
-</p>
-</div><!-- END: 13.4.1 - juneau-microservice-jetty-template.Config.ConfigApi
-->
-</div><!-- END: 13.4 - juneau-microservice-jetty-template.Config -->
-
-<!--
====================================================================================================
-->
-
-<h3 class='topic todo' onclick='toggle(this)'><a
href='#juneau-microservice-jetty-template.ResourceClasses'
id='juneau-microservice-jetty-template.ResourceClasses'>13.5 - Resource
Classes</a></h3>
-<div class='topic'><!-- START: 13.5 -
juneau-microservice-jetty-template.ResourceClasses -->
-<p>
- Now let's take a look at the resource classes themselves.
- <br>The top-level page...
-</p>
-<p class='bpcode w800'>
- http://localhost:10000
-</p>
-<img class='bordered w800'
src='doc-files/juneau-microservice-server.Running.1.png'>
-<p>
- ...is generated by this class...
-<p class='bpcode w800'>
- <ja>@RestResource</ja>(
- path=<js>"/"</js>,
- title=<js>"My Microservice"</js>,
- description=<js>"Top-level resources page"</js>,
- htmldoc=<ja>@HtmlDoc</ja>(
- navlinks={
- <js>"options: servlet:/?method=OPTIONS"</js>
- }
- ),
- children={
- HelloWorldResource.<jk>class</jk>,
- ConfigResource.<jk>class</jk>,
- LogsResource.<jk>class</jk>
- }
- )
- <jk>public class</jk> RootResources <jk>extends</jk>
BasicRestServletJenaGroup {
- <jc>// No code! </jc>
- }
-</p>
-<ul class='spaced-list'>
- <li>
- The </l>title</l> and <l>description</l> annotations define the titles
on the page.
- <br>These can be globalized using <l>$L{...}</l> variables, or by
defining specially-named properties in the
- properties file for the resource.
- <li>
- In this case, the <l>path</l> annotation defines the context root of
your application since it was
- not specified in the manifest or config file.
- <br>Therefore, this resource is mapped to <l>http://localhost:10000</l>.
- <li>
- The <l>children</l> annotation make up the list of child resources.
- <br>These child resources can be anything that extends from
<l>Servlet</l>, although usually
- they will be subclasses of <a
href="org/apache/juneau/rest/BasicRestServlet.html" title="class in
org.apache.juneau.rest"><code>BasicRestServlet</code></a> or other resource
groups.
-</ul>
-<p>
- If you click the <l>helloWorld</l> link in your application, you'll get a
simple hello world message:
-</p>
-<p class='bpcode w800'>
- http://localhost:10000/helloWorld
-</p>
-<img class='bordered w800'
src='doc-files/juneau-microservice-server.ResourceClasses.1.png'>
-<p>
- ...which is generated by this class...
-</p>
-<p class='bpcode w800'>
- <ja>@RestResource</ja>(
- path=<js>"/helloWorld"</js>,
- title=<js>"Hello World example"</js>,
- description=<js>"Simplest possible REST resource"</js>
- )
- <jk>public class</jk> HelloWorldResource <jk>extends</jk> BasicRestServlet {
-
- <ja>@RestMethod</ja>(name=<jsf>GET</jsf>, path=<js>"/*"</js>)
- <jk>public</jk> String sayHello() {
- <jk>return</jk> <js>"Hello world!"</js>;
- }
- }
-</p>
-</div><!-- END: 13.5 - juneau-microservice-jetty-template.ResourceClasses -->
-
-<!--
====================================================================================================
-->
-
-<h3 class='topic todo' onclick='toggle(this)'><a
href='#juneau-microservice-jetty-template.PredefinedResourceClasses'
id='juneau-microservice-jetty-template.PredefinedResourceClasses'>13.6 -
Predefined Resource Classes</a></h3>
-<div class='topic'><!-- START: 13.6 -
juneau-microservice-jetty-template.PredefinedResourceClasses -->
-<p>
- The following predefined resource classes are also provided for easy
inclusion into your microservice:
-</p>
-<ul class='doctree'>
- <li class='jc'><a
href="org/apache/juneau/microservice/resources/ConfigResource.html"
title="class in
org.apache.juneau.microservice.resources"><code>ConfigResource</code></a>
- - View and modify the external INI config file.
- <li class='jc'><a
href="org/apache/juneau/microservice/resources/DirectoryResource.html"
title="class in
org.apache.juneau.microservice.resources"><code>DirectoryResource</code></a>
- - View and modify file system directories.
- <li class='jc'><a
href="org/apache/juneau/microservice/resources/LogsResource.html" title="class
in org.apache.juneau.microservice.resources"><code>LogsResource</code></a>
- - View and control generated log files.
- <li class='jc'><a
href="org/apache/juneau/microservice/resources/SampleRootResource.html"
title="class in
org.apache.juneau.microservice.resources"><code>SampleRootResource</code></a>
- - A sample root resource class to get started from.
- <li class='jc'><a
href="org/apache/juneau/microservice/resources/ShutdownResource.html"
title="class in
org.apache.juneau.microservice.resources"><code>ShutdownResource</code></a>
- - Shutdown and/or restart the JVM.
-</ul>
-</div><!-- END: 13.6 -
juneau-microservice-jetty-template.PredefinedResourceClasses -->
-
-<!--
====================================================================================================
-->
-
-<h3 class='topic todo' onclick='toggle(this)'><a
href='#juneau-microservice-jetty-template.RestMicroservice'
id='juneau-microservice-jetty-template.RestMicroservice'>13.7 -
RestMicroservice</a></h3>
-<div class='topic'><!-- START: 13.7 -
juneau-microservice-jetty-template.RestMicroservice -->
-<p>
- The <code>RestMicroservice</code> class is the main application entry-point
for REST
- microservices.
-</p>
-<p>
- The class hierarchy is:
-</p>
-<ul class='doctree'>
- <li class='jac'>
- <a href="org/apache/juneau/microservice/Microservice.html" title="class
in org.apache.juneau.microservice"><code>Microservice</code></a>
- - Abstract class that defines simple start/stop methods and access to
the manifest file, config file, and
- arguments.
- <ul>
- <li class='jc'>
- <code>RestMicroservice</code>
- - Specialized microservice for starting up REST interfaces using
Jetty and specifying REST servlets
- through the manifest file or config file.
- </ul>
- </li>
-</ul>
-<p>
- Refer to the Javadocs for these class for more information.
-</p>
-
-<!--
====================================================================================================
-->
-
-<h4 class='topic ' onclick='toggle(this)'><a
href='#juneau-microservice-jetty-template.RestMicroservice.Extending'
id='juneau-microservice-jetty-template.RestMicroservice.Extending'>13.7.1 -
Extending RestMicroservice</a></h4>
-<div class='topic'><!-- START: 13.7.1 -
juneau-microservice-jetty-template.RestMicroservice.Extending -->
-<p>
- This example shows how the <code>RestMicroservice</code> class
- can be extended to implement lifecycle listener methods or override
existing methods.
- <br>We'll create a new class <l>com.foo.SampleCustomRestMicroservice</l>.
-</p>
-<p>
- First, the manifest file needs to be modified to point to our new
microservice:
-</p>
-<p class='bpcode w800'>
- <mk>Main-Class:</mk> com.foo.SampleCustomRestMicroservice
-</p>
-<p>
- Then we define the following class:
-</p>
-<p class='bpcode w800'>
- <jd>/**
- * Sample subclass of a RestMicroservice that provides customized behavior.
- * This class must be specified in the Main-Class entry in the manifest
file and optionally
- * a Main-ConfigFile entry.
- */</jd>
- <jk>public class</jk> SampleCustomRestMicroservice <jk>extends</jk>
RestMicroservice {
-
- <jd>/**
- * Must implement a main method and call start()!
- */</jd>
- <jk>public static void</jk> main(String[] args) <jk>throws</jk>
Exception {
- <jk>new</jk> SampleCustomRestMicroservice(args).start().join();
- }
-
- <jd>/**
- * Must implement a constructor!
- *
- * <ja>@param</ja> args Command line arguments.
- * <ja>@throws</ja> Exception
- */</jd>
- <jk>public</jk> SampleCustomRestMicroservice(String[] args)
<jk>throws</jk> Exception {
- <jk>super</jk>(args);
- }
-</p>
-<p>
- The microservice APIs provide several useful methods that can be used or
extended.
-</p>
-<h5 class='section'>See Also:</h5>
-<ul class='doctree'>
- <li class='jac'><a href="org/apache/juneau/microservice/Microservice.html"
title="class in org.apache.juneau.microservice"><code>Microservice</code></a>
- <li class='jc'><code>RestMicroservice</code>
-</ul>
-</div><!-- END: 13.7.1 -
juneau-microservice-jetty-template.RestMicroservice.Extending -->
-</div><!-- END: 13.7 - juneau-microservice-jetty-template.RestMicroservice -->
-
-<!--
====================================================================================================
-->
-
-<h3 class='topic todo' onclick='toggle(this)'><a
href='#juneau-microservice-jetty-template.UiCustomization'
id='juneau-microservice-jetty-template.UiCustomization'>13.8 - UI
Customization</a></h3>
-<div class='topic'><!-- START: 13.8 -
juneau-microservice-jetty-template.UiCustomization -->
-<p>
- The Microservice project contains a <code>files/htdocs</code> working
directly folder with predefined stylesheets and
- images.
-</p>
-<img style='width:200px'
src='doc-files/juneau-microservice.UiCustomization.1.png'>
-<p>
- These files can be used to tailor the look-and-feel of your microservice.
-</p>
-<p class='bpcode w800'>
- http://localhost:10000/helloWorld
-</p>
-<img class='bordered w800'
src='doc-files/juneau-rest-server.UiCustomization.1.png'>
-<p>
- The REST configuration section of your microservice configuration file can
be used to tailor the header and footer on the pages:
-</p>
-<p class='bpcode w800'>
-
<cc>#=======================================================================================================================
- # REST settings
-
#=======================================================================================================================</cc>
- <cs>[REST]</cs>
-
- <ck>staticFiles</ck> = <cv>htdocs:files/htdocs</cv>
-
- <cc># Stylesheet to use for HTML views.</cc>
- <ck>theme</ck> = <cv>servlet:/htdocs/themes/devops.css</cv>
-
- <ck>headerIcon</ck> = <cv>servlet:/htdocs/images/juneau.png</cv>
- <ck>headerLink</ck> = <cv>http://juneau.apache.org</cv>
- <ck>footerIcon</ck> = <cv>servlet:/htdocs/images/asf.png</cv>
- <ck>footerLink</ck> = <cv>http://www.apache.org</cv>
-
- <ck>favicon</ck> = <cv>$C{REST/headerIcon}</cv>
- <ck>header</ck> =
- <cv><a href='$U{$C{REST/headerLink}}'></cv>
- <cv><img src='$U{$C{REST/headerIcon}}'
style='position:absolute;top:5;right:5;background-color:transparent;height:30px'/></cv>
- <cv></a></cv>
- <ck>footer</ck> =
- <cv><a href='$U{$C{REST/footerLink}}'></cv>
- <cv><img src='$U{$C{REST/footerIcon}}'
style='float:right;padding-right:20px;height:32px'/></cv>
- <cv></a></cv>
-</p>
-<p>
- The <a href="org/apache/juneau/rest/BasicRestConfig.html" title="interface
in org.apache.juneau.rest"><code>BasicRestConfig</code></a> interface (which
defines the default settings for <a
href="org/apache/juneau/rest/BasicRestServlet.html" title="class in
org.apache.juneau.rest"><code>BasicRestServlet</code></a>
- pulls in this information using <a
href="org/apache/juneau/config/vars/ConfigVar.html" title="class in
org.apache.juneau.config.vars"><code>$C</code></a> and <a
href="org/apache/juneau/rest/vars/UrlVar.html" title="class in
org.apache.juneau.rest.vars"><code>$U</code></a> variables:
-</p>
-<p class='bpcode w800'>
- <ja>@RestResource</ja>(
- ...
- <jc>// HTML-page specific settings</jc>
- htmldoc=<ja>@HtmlDoc</ja>(
-
- <jc>// Default page header contents.</jc>
- header={
- <js>"<h1>$R{resourceTitle}</h1>"</js>, <jc>// Use
@RestResource(title)</jc>
-
<js>"<h2>$R{methodSummary,resourceDescription}</h2>"</js>, <jc>//
Use either @RestMethod(summary) or @RestResource(description)</jc>
- <js>"$C{REST/header}"</js> <jc>// Extra header HTML defined in
external config file.</jc>
- },
-
- <jc>// Default stylesheet to use for the page.
- // Can be overridden from external config file.
- // Default is DevOps look-and-feel (aka Depression
look-and-feel).</jc>
-
stylesheet=<js>"$C{REST/theme,servlet:/htdocs/themes/devops.css}"</js>,
-
- <jc>// Default contents to add to the <head> section of the
HTML page.
- // Use it to add a favicon link to the page.</jc>
- head={
- <js>"<link rel='icon' href='$U{$C{REST/favicon}}'/>"</js>
- },
-
- <jc>// No default page footer contents.
- // Can be overridden from external config file.</jc>
- footer=<js>"$C{REST/footer}"</js>
- ),
-
- <jc>// Optional external configuration file.</jc>
- config=<js>"$S{juneau.configFile}"</js>,
-
- <jc>// These are static files that are served up by the servlet under
the specified sub-paths.
- // For example, "/servletPath/htdocs/javadoc.css" resolves to the file
"[servlet-package]/htdocs/javadoc.css"
- // By default, we define static files through the external configuration
file.</jc>
- staticFiles=<js>"$C{REST/staticFiles}"</js>
- )
- <jk>public interface</jk> BasicRestConfig {}
-</p>
-<p>
- Note that the <code>files/htdocs</code> directory is mapped to
<js>"servlet:/htdocs"</js> using the <code>staticFiles</code>
- setting. This allows those files to be served up through the servlet
through the URL <js>"/[servlet-path]/htdocs"</js>
-</p>
-<p>
- The theme files are externally accessible and can be modified to produce
any look-and-feel you desire.
- The microservice still works without the files directory. An embedded
<code>devops.css</code> is included in the jar as a default spreadsheet.
-</p>
-<p>
- If you're testing out changes in the theme stylesheets, you may want to set
the following system property that prevents caching of those files so
- that you don't need to restart the microservice each time a change is made:
-</p>
-<p class='bpcode w800'>
-
<cc>#=======================================================================================================================
- # System properties
-
#-----------------------------------------------------------------------------------------------------------------------
- # These are arbitrary system properties that are set during startup.
-
#=======================================================================================================================</cc>
- <cs>[SystemProperties]</cs>
-
- <cc># Disable classpath resource caching.
- # Useful if you're attached using a debugger and you're modifying classpath
resources while running.</cc>
- <ck>RestContext.useClasspathResourceCaching.b</ck> = <cv>false</cv>
-
-</p>
-</div><!-- END: 13.8 - juneau-microservice-jetty-template.UiCustomization -->
</div><!-- END: 13 - juneau-microservice-jetty-template -->
<!--
====================================================================================================
-->
@@ -26627,17 +26154,17 @@
<li class='jc'><a
href="org/apache/juneau/examples/core/json/JsonComplexExample.html"
title="class in
org.apache.juneau.examples.core.json"><code>JsonComplexExample</code></a> -
JsonSerializer and JsonParser usage on serialize and deserialize complex Pojo
bean.
<li class='jc'><a
href="org/apache/juneau/examples/core/json/JsonConfigurationExample.html"
title="class in
org.apache.juneau.examples.core.json"><code>JsonConfigurationExample</code></a>
</ul>
- <li class='jp'><code>org.apache.juneau.examples.core.xml</code>
+ <li class='jp'><a
href="org/apache/juneau/examples/core/xml/package-summary.html"><code>org.apache.juneau.examples.core.xml</code></a>
<ul>
<li class='jc'><a
href="org/apache/juneau/examples/core/xml/XmlSimpleExample.html" title="class
in org.apache.juneau.examples.core.xml"><code>XmlSimpleExample</code></a> -
XmlSerializer and XmlParser usage on serialize and deserialize simple Pojo bean.
<li class='jc'><a
href="org/apache/juneau/examples/core/xml/XmlComplexExample.html" title="class
in org.apache.juneau.examples.core.xml"><code>XmlComplexExample</code></a> -
XmlSerializer and XmlParser usage on serialize and deserialize complex Pojo
bean.
</ul>
- <li class='jp'><code>org.apache.juneau.examples.core.rdf</code>
+ <li class='jp'><a
href="org/apache/juneau/examples/core/rdf/package-summary.html"><code>org.apache.juneau.examples.core.rdf</code></a>
<ul>
<li class='jc'><a
href="org/apache/juneau/examples/core/rdf/RdfExample.html" title="class in
org.apache.juneau.examples.core.rdf"><code>RdfExample</code></a> -
RdfXmlSerializer usage on serialize simple Pojo bean.
<li class='jc'><a
href="org/apache/juneau/examples/core/rdf/RdfComplexExample.html" title="class
in org.apache.juneau.examples.core.rdf"><code>RdfComplexExample</code></a> -
RdfXmlSerializer usage on serialize complex Pojo bean.
</ul>
- <li class='jp'><code>org.apache.juneau.examples.core.html</code>
+ <li class='jp'><a
href="org/apache/juneau/examples/core/html/package-summary.html"><code>org.apache.juneau.examples.core.html</code></a>
<ul>
<li class='jc'><a
href="org/apache/juneau/examples/core/html/HtmlSimpleExample.html" title="class
in org.apache.juneau.examples.core.html"><code>HtmlSimpleExample</code></a> -
HtmlSerializer usage on serialize simple Pojo bean.
<li class='jc'><a
href="org/apache/juneau/examples/core/html/HtmlComplexExample.html"
title="class in
org.apache.juneau.examples.core.html"><code>HtmlComplexExample</code></a> -
HtmlSerializer usage on serialize complex Pojo bean.
diff --git a/content/site/apidocs-8.0.0/overview-tree.html
b/content/site/apidocs-8.0.0/overview-tree.html
index c786432..510e0fd 100644
--- a/content/site/apidocs-8.0.0/overview-tree.html
+++ b/content/site/apidocs-8.0.0/overview-tree.html
@@ -300,6 +300,7 @@
<li type="circle">org.apache.juneau.rest.util.<a
href="org/apache/juneau/rest/util/AnnotationUtils.html" title="class in
org.apache.juneau.rest.util"><span
class="typeNameLink">AnnotationUtils</span></a></li>
</ul>
</li>
+<li type="circle">org.apache.juneau.microservice.sample.<a
href="org/apache/juneau/microservice/sample/App.html" title="class in
org.apache.juneau.microservice.sample"><span
class="typeNameLink">App</span></a></li>
<li type="circle">org.apache.juneau.examples.rest.jetty.<a
href="org/apache/juneau/examples/rest/jetty/App.html" title="class in
org.apache.juneau.examples.rest.jetty"><span
class="typeNameLink">App</span></a></li>
<li type="circle">org.apache.juneau.examples.rest.springboot.<a
href="org/apache/juneau/examples/rest/springboot/App.html" title="class in
org.apache.juneau.examples.rest.springboot"><span
class="typeNameLink">App</span></a></li>
<li type="circle">org.apache.juneau.internal.<a
href="org/apache/juneau/internal/ArrayUtils.html" title="class in
org.apache.juneau.internal"><span
class="typeNameLink">ArrayUtils</span></a></li>
diff --git a/content/site/apidocs-8.0.0/resources/docs.txt
b/content/site/apidocs-8.0.0/resources/docs.txt
index ace5c1d..2f9ea12 100644
--- a/content/site/apidocs-8.0.0/resources/docs.txt
+++ b/content/site/apidocs-8.0.0/resources/docs.txt
@@ -216,20 +216,11 @@ juneau-microservice-core.SystemProperties =
#juneau-microservice-core.SystemProp
juneau-microservice-core.VarResolver = #juneau-microservice-core.VarResolver,
Overview > juneau-microservice-core > VarResolver
juneau-microservice-jetty = #juneau-microservice-jetty, Overview >
juneau-microservice-jetty
juneau-microservice-jetty-template = #juneau-microservice-jetty-template,
Overview > juneau-microservice-jetty-template
-juneau-microservice-jetty-template.Config =
#juneau-microservice-jetty-template.Config, Overview >
juneau-microservice-jetty-template > Config
-juneau-microservice-jetty-template.Config.ConfigApi =
#juneau-microservice-jetty-template.Config.ConfigApi, Overview >
juneau-microservice-jetty-template > Config > Config File API
juneau-microservice-jetty-template.GettingStarted =
#juneau-microservice-jetty-template.GettingStarted, Overview >
juneau-microservice-jetty-template > Getting Started
juneau-microservice-jetty-template.GettingStarted.Building =
#juneau-microservice-jetty-template.GettingStarted.Building, Overview >
juneau-microservice-jetty-template > Getting Started > Building and Running
from Command-Line
juneau-microservice-jetty-template.GettingStarted.Installing =
#juneau-microservice-jetty-template.GettingStarted.Installing, Overview >
juneau-microservice-jetty-template > Getting Started > Installing in Eclipse
juneau-microservice-jetty-template.GettingStarted.Running =
#juneau-microservice-jetty-template.GettingStarted.Running, Overview >
juneau-microservice-jetty-template > Getting Started > Running in Eclipse
juneau-microservice-jetty-template.Introduction =
#juneau-microservice-jetty-template.Introduction, Overview >
juneau-microservice-jetty-template > Microservice Introduction
-juneau-microservice-jetty-template.Manifest =
#juneau-microservice-jetty-template.Manifest, Overview >
juneau-microservice-jetty-template > Manifest File
-juneau-microservice-jetty-template.Manifest.ManifestApi =
#juneau-microservice-jetty-template.Manifest.ManifestApi, Overview >
juneau-microservice-jetty-template > Manifest File > Manifest API
-juneau-microservice-jetty-template.PredefinedResourceClasses =
#juneau-microservice-jetty-template.PredefinedResourceClasses, Overview >
juneau-microservice-jetty-template > Predefined Resource Classes
-juneau-microservice-jetty-template.ResourceClasses =
#juneau-microservice-jetty-template.ResourceClasses, Overview >
juneau-microservice-jetty-template > Resource Classes
-juneau-microservice-jetty-template.RestMicroservice =
#juneau-microservice-jetty-template.RestMicroservice, Overview >
juneau-microservice-jetty-template > RestMicroservice
-juneau-microservice-jetty-template.RestMicroservice.Extending =
#juneau-microservice-jetty-template.RestMicroservice.Extending, Overview >
juneau-microservice-jetty-template > RestMicroservice > Extending
RestMicroservice
-juneau-microservice-jetty-template.UiCustomization =
#juneau-microservice-jetty-template.UiCustomization, Overview >
juneau-microservice-jetty-template > UI Customization
juneau-microservice-jetty.Config = #juneau-microservice-jetty.Config, Overview
> juneau-microservice-jetty > Config
juneau-microservice-jetty.Extending = #juneau-microservice-jetty.Extending,
Overview > juneau-microservice-jetty > Extending JettyMicroservice
juneau-microservice-jetty.JettyXml = #juneau-microservice-jetty.JettyXml,
Overview > juneau-microservice-jetty > Jetty.xml file
diff --git a/content/site/apidocs-8.0.0/resources/fragments/toc.html
b/content/site/apidocs-8.0.0/resources/fragments/toc.html
index 7ecbb7a..6de8dad 100644
--- a/content/site/apidocs-8.0.0/resources/fragments/toc.html
+++ b/content/site/apidocs-8.0.0/resources/fragments/toc.html
@@ -360,30 +360,15 @@
<li><p class='new'><a class='doclink'
href='{OVERVIEW_URL}#juneau-microservice-jetty.UiCustomization'>UI
Customization</a></p>
<li><p class='new'><a class='doclink'
href='{OVERVIEW_URL}#juneau-microservice-jetty.Extending'>Extending
JettyMicroservice</a></p>
</ol>
- <li><p class='toc2 todo'><a class='doclink'
href='{OVERVIEW_URL}#juneau-microservice-jetty-template'>juneau-microservice-jetty-template</a></p>
+ <li><p class='toc2 new'><a class='doclink'
href='{OVERVIEW_URL}#juneau-microservice-jetty-template'>juneau-microservice-jetty-template</a></p>
<ol>
- <li><p class='todo'><a class='doclink'
href='{OVERVIEW_URL}#juneau-microservice-jetty-template.Introduction'>Microservice
Introduction</a></p>
- <li><p class='todo'><a class='doclink'
href='{OVERVIEW_URL}#juneau-microservice-jetty-template.GettingStarted'>Getting
Started</a></p>
+ <li><p class='updated'><a class='doclink'
href='{OVERVIEW_URL}#juneau-microservice-jetty-template.Introduction'>Microservice
Introduction</a></p>
+ <li><p class='updated'><a class='doclink'
href='{OVERVIEW_URL}#juneau-microservice-jetty-template.GettingStarted'>Getting
Started</a></p>
<ol>
- <li><p class=''><a class='doclink'
href='{OVERVIEW_URL}#juneau-microservice-jetty-template.GettingStarted.Installing'>Installing
in Eclipse</a></p>
- <li><p class=''><a class='doclink'
href='{OVERVIEW_URL}#juneau-microservice-jetty-template.GettingStarted.Running'>Running
in Eclipse</a></p>
- <li><p class=''><a class='doclink'
href='{OVERVIEW_URL}#juneau-microservice-jetty-template.GettingStarted.Building'>Building
and Running from Command-Line</a></p>
+ <li><p class='updated'><a class='doclink'
href='{OVERVIEW_URL}#juneau-microservice-jetty-template.GettingStarted.Installing'>Installing
in Eclipse</a></p>
+ <li><p class='updated'><a class='doclink'
href='{OVERVIEW_URL}#juneau-microservice-jetty-template.GettingStarted.Running'>Running
in Eclipse</a></p>
+ <li><p class='updated'><a class='doclink'
href='{OVERVIEW_URL}#juneau-microservice-jetty-template.GettingStarted.Building'>Building
and Running from Command-Line</a></p>
</ol>
- <li><p class='todo'><a class='doclink'
href='{OVERVIEW_URL}#juneau-microservice-jetty-template.Manifest'>Manifest
File</a></p>
- <ol>
- <li><p class=''><a class='doclink'
href='{OVERVIEW_URL}#juneau-microservice-jetty-template.Manifest.ManifestApi'>Manifest
API</a></p>
- </ol>
- <li><p class='todo'><a class='doclink'
href='{OVERVIEW_URL}#juneau-microservice-jetty-template.Config'>Config</a></p>
- <ol>
- <li><p class=''><a class='doclink'
href='{OVERVIEW_URL}#juneau-microservice-jetty-template.Config.ConfigApi'>Config
File API</a></p>
- </ol>
- <li><p class='todo'><a class='doclink'
href='{OVERVIEW_URL}#juneau-microservice-jetty-template.ResourceClasses'>Resource
Classes</a></p>
- <li><p class='todo'><a class='doclink'
href='{OVERVIEW_URL}#juneau-microservice-jetty-template.PredefinedResourceClasses'>Predefined
Resource Classes</a></p>
- <li><p class='todo'><a class='doclink'
href='{OVERVIEW_URL}#juneau-microservice-jetty-template.RestMicroservice'>RestMicroservice</a></p>
- <ol>
- <li><p class=''><a class='doclink'
href='{OVERVIEW_URL}#juneau-microservice-jetty-template.RestMicroservice.Extending'>Extending
RestMicroservice</a></p>
- </ol>
- <li><p class='todo'><a class='doclink'
href='{OVERVIEW_URL}#juneau-microservice-jetty-template.UiCustomization'>UI
Customization</a></p>
</ol>
<li><p class='toc2 '><a class='doclink'
href='{OVERVIEW_URL}#juneau-examples-core'>juneau-examples-core</a></p>
<ol>
diff --git
a/content/site/apidocs-8.0.0/src-html/org/apache/juneau/examples/rest/jetty/App.html
b/content/site/apidocs-8.0.0/src-html/org/apache/juneau/examples/rest/jetty/App.html
index 99c5a2f..4218aaa 100644
---
a/content/site/apidocs-8.0.0/src-html/org/apache/juneau/examples/rest/jetty/App.html
+++
b/content/site/apidocs-8.0.0/src-html/org/apache/juneau/examples/rest/jetty/App.html
@@ -52,8 +52,7 @@
<span class="sourceLineNo">044</span> .startConsole()<a
name="line.44"></a>
<span class="sourceLineNo">045</span> .join();<a name="line.45"></a>
<span class="sourceLineNo">046</span> }<a name="line.46"></a>
-<span class="sourceLineNo">047</span><a name="line.47"></a>
-<span class="sourceLineNo">048</span>}<a name="line.48"></a>
+<span class="sourceLineNo">047</span>}<a name="line.47"></a>
diff --git
a/content/site/apidocs-8.0.0/src-html/org/apache/juneau/microservice/sample/RootResources.html
b/content/site/apidocs-8.0.0/src-html/org/apache/juneau/microservice/sample/App.html
similarity index 50%
copy from
content/site/apidocs-8.0.0/src-html/org/apache/juneau/microservice/sample/RootResources.html
copy to
content/site/apidocs-8.0.0/src-html/org/apache/juneau/microservice/sample/App.html
index 20b4d1b..ecdeed5 100644
---
a/content/site/apidocs-8.0.0/src-html/org/apache/juneau/microservice/sample/RootResources.html
+++
b/content/site/apidocs-8.0.0/src-html/org/apache/juneau/microservice/sample/App.html
@@ -20,39 +20,34 @@
<span class="sourceLineNo">012</span>//
***************************************************************************************************************************<a
name="line.12"></a>
<span class="sourceLineNo">013</span>package
org.apache.juneau.microservice.sample;<a name="line.13"></a>
<span class="sourceLineNo">014</span><a name="line.14"></a>
-<span class="sourceLineNo">015</span>import
org.apache.juneau.microservice.resources.ConfigResource;<a name="line.15"></a>
-<span class="sourceLineNo">016</span>import
org.apache.juneau.microservice.resources.LogsResource;<a name="line.16"></a>
-<span class="sourceLineNo">017</span>import org.apache.juneau.rest.*;<a
name="line.17"></a>
-<span class="sourceLineNo">018</span>import
org.apache.juneau.rest.annotation.HtmlDoc;<a name="line.18"></a>
-<span class="sourceLineNo">019</span>import
org.apache.juneau.rest.annotation.RestResource;<a name="line.19"></a>
-<span class="sourceLineNo">020</span>import
org.apache.juneau.rest.widget.ContentTypeMenuItem;<a name="line.20"></a>
-<span class="sourceLineNo">021</span>import
org.apache.juneau.rest.widget.ThemeMenuItem;<a name="line.21"></a>
-<span class="sourceLineNo">022</span><a name="line.22"></a>
-<span class="sourceLineNo">023</span>/**<a name="line.23"></a>
-<span class="sourceLineNo">024</span> * Root microservice page.<a
name="line.24"></a>
-<span class="sourceLineNo">025</span> */<a name="line.25"></a>
-<span class="sourceLineNo">026</span>@RestResource(<a name="line.26"></a>
-<span class="sourceLineNo">027</span> path="/",<a name="line.27"></a>
-<span class="sourceLineNo">028</span> title="My Microservice",<a
name="line.28"></a>
-<span class="sourceLineNo">029</span> description="Top-level resources
page",<a name="line.29"></a>
-<span class="sourceLineNo">030</span> htmldoc=@HtmlDoc(<a name="line.30"></a>
-<span class="sourceLineNo">031</span> widgets={<a name="line.31"></a>
-<span class="sourceLineNo">032</span> ContentTypeMenuItem.class,<a
name="line.32"></a>
-<span class="sourceLineNo">033</span> ThemeMenuItem.class<a
name="line.33"></a>
-<span class="sourceLineNo">034</span> },<a name="line.34"></a>
-<span class="sourceLineNo">035</span> navlinks={<a name="line.35"></a>
-<span class="sourceLineNo">036</span> "options:
servlet:/?method=OPTIONS"<a name="line.36"></a>
-<span class="sourceLineNo">037</span> }<a name="line.37"></a>
-<span class="sourceLineNo">038</span> ),<a name="line.38"></a>
-<span class="sourceLineNo">039</span> children={<a name="line.39"></a>
-<span class="sourceLineNo">040</span> HelloWorldResource.class,<a
name="line.40"></a>
-<span class="sourceLineNo">041</span> ConfigResource.class,<a
name="line.41"></a>
-<span class="sourceLineNo">042</span> LogsResource.class<a
name="line.42"></a>
-<span class="sourceLineNo">043</span> }<a name="line.43"></a>
-<span class="sourceLineNo">044</span>)<a name="line.44"></a>
-<span class="sourceLineNo">045</span>public class RootResources extends
BasicRestServletGroup {<a name="line.45"></a>
-<span class="sourceLineNo">046</span> private static final long
serialVersionUID = 1L;<a name="line.46"></a>
-<span class="sourceLineNo">047</span>}<a name="line.47"></a>
+<span class="sourceLineNo">015</span>import
org.apache.juneau.microservice.jetty.*;<a name="line.15"></a>
+<span class="sourceLineNo">016</span><a name="line.16"></a>
+<span class="sourceLineNo">017</span>/**<a name="line.17"></a>
+<span class="sourceLineNo">018</span> * Entry-point for your microservice.<a
name="line.18"></a>
+<span class="sourceLineNo">019</span> *<a name="line.19"></a>
+<span class="sourceLineNo">020</span> * <p><a name="line.20"></a>
+<span class="sourceLineNo">021</span> * The {@link JettyMicroservice} class
will locate the <code>my-microservice.cfg</code> file in the home
directory and initialize<a name="line.21"></a>
+<span class="sourceLineNo">022</span> * the resources and commands defined in
that file.<a name="line.22"></a>
+<span class="sourceLineNo">023</span> */<a name="line.23"></a>
+<span class="sourceLineNo">024</span>public class App {<a name="line.24"></a>
+<span class="sourceLineNo">025</span><a name="line.25"></a>
+<span class="sourceLineNo">026</span> /**<a name="line.26"></a>
+<span class="sourceLineNo">027</span> * Entry point method.<a
name="line.27"></a>
+<span class="sourceLineNo">028</span> *<a name="line.28"></a>
+<span class="sourceLineNo">029</span> * @param args Command line
arguments.<a name="line.29"></a>
+<span class="sourceLineNo">030</span> * @throws Exception<a
name="line.30"></a>
+<span class="sourceLineNo">031</span> */<a name="line.31"></a>
+<span class="sourceLineNo">032</span> public static void main(String[] args)
throws Exception {<a name="line.32"></a>
+<span class="sourceLineNo">033</span> JettyMicroservice<a
name="line.33"></a>
+<span class="sourceLineNo">034</span> .create()<a name="line.34"></a>
+<span class="sourceLineNo">035</span> .args(args)<a name="line.35"></a>
+<span class="sourceLineNo">036</span> .servlet(RootResources.class)<a
name="line.36"></a>
+<span class="sourceLineNo">037</span> .build()<a name="line.37"></a>
+<span class="sourceLineNo">038</span> .start()<a name="line.38"></a>
+<span class="sourceLineNo">039</span> .startConsole()<a
name="line.39"></a>
+<span class="sourceLineNo">040</span> .join();<a name="line.40"></a>
+<span class="sourceLineNo">041</span> }<a name="line.41"></a>
+<span class="sourceLineNo">042</span>}<a name="line.42"></a>
diff --git
a/content/site/apidocs-8.0.0/src-html/org/apache/juneau/microservice/sample/RootResources.html
b/content/site/apidocs-8.0.0/src-html/org/apache/juneau/microservice/sample/RootResources.html
index 20b4d1b..bbb7d4a 100644
---
a/content/site/apidocs-8.0.0/src-html/org/apache/juneau/microservice/sample/RootResources.html
+++
b/content/site/apidocs-8.0.0/src-html/org/apache/juneau/microservice/sample/RootResources.html
@@ -32,7 +32,7 @@
<span class="sourceLineNo">024</span> * Root microservice page.<a
name="line.24"></a>
<span class="sourceLineNo">025</span> */<a name="line.25"></a>
<span class="sourceLineNo">026</span>@RestResource(<a name="line.26"></a>
-<span class="sourceLineNo">027</span> path="/",<a name="line.27"></a>
+<span class="sourceLineNo">027</span> path="/*",<a name="line.27"></a>
<span class="sourceLineNo">028</span> title="My Microservice",<a
name="line.28"></a>
<span class="sourceLineNo">029</span> description="Top-level resources
page",<a name="line.29"></a>
<span class="sourceLineNo">030</span> htmldoc=@HtmlDoc(<a name="line.30"></a>