This is an automated email from the ASF dual-hosted git repository.
jamesbognar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/juneau.git
The following commit(s) were added to refs/heads/master by this push:
new c734ab5 Javadocs.
c734ab5 is described below
commit c734ab5fae63fe10c27c563ebd8e2cee5e1c714b
Author: JamesBognar <[email protected]>
AuthorDate: Sun Dec 16 17:55:43 2018 -0500
Javadocs.
---
...au-microservice-jetty-template.Installing.1.png | Bin 156973 -> 0 bytes
...oservice.html => 13.my-jetty-microservice.html} | 8 +-
.../01.Installing.html | 26 +-
.../02.Running.html | 11 +-
.../03.Building.html | 8 +-
.../my-jetty-microservice.Installing.1.png | Bin 0 -> 159036 bytes
.../my-jetty-microservice.Installing.2.png} | Bin
.../doc-files/my-jetty-microservice.Running.1.png} | Bin
...croservice-springboot-template.Installing.1.png | Bin 156973 -> 0 bytes
...ice.html => 14.my-springboot-microservice.html} | 8 +-
.../01.Installing.html | 21 +-
.../02.Running.html | 13 +-
.../03.Building.html | 4 +-
.../my-springboot-microservice.Installing.1.png | Bin 0 -> 162034 bytes
.../my-springboot-microservice.Installing.2.png} | Bin
.../my-springboot-microservice.Running.1.png} | Bin
.../docs/Topics/15.juneau-examples-core.html | 26 +-
.../01.Installing.html} | 17 +-
.../{01.Examples.html => 02.Examples.html} | 0
.../docs/Topics/17.juneau-examples-rest-jetty.html | 25 +-
.../17.juneau-examples-rest-jetty/01.Classes.html | 56 --
.../01.Installing.html | 66 +-
.../02.DeployingToHeroku.html | 20 -
.../02.Running.html | 13 +-
.../03.Building.html | 14 +-
.../juneau-examples-rest-jetty.Installing.1.png | Bin 0 -> 160013 bytes
...=> juneau-examples-rest-jetty.Installing.2.png} | Bin
.../juneau-examples-rest-jetty.Running.1.png | Bin 0 -> 98777 bytes
.../Topics/18.juneau-examples-rest-springboot.html | 13 +-
.../01.Classes.html | 56 --
.../01.Installing.html | 45 +-
.../02.Running.html | 13 +-
.../03.Building.html | 4 +-
...yingToHeroku.html => 04.DeployingToHeroku.html} | 0
...uneau-examples-rest-springboot.Installing.1.png | Bin 0 -> 162296 bytes
...neau-examples-rest-springboot.Installing.2.png} | Bin
.../juneau-examples-rest-springboot.Running.1.png | Bin 0 -> 98777 bytes
.../juneau-examples-rest-jetty.Installing.1.png | Bin 0 -> 160013 bytes
.../juneau-examples-rest-jetty.Installing.2.png} | Bin
.../juneau-examples-rest-jetty.Running.1.png | Bin 0 -> 98777 bytes
.../juneau-examples-rest-springboot.Classes.png | Bin 26502 -> 0 bytes
...uneau-examples-rest-springboot.Installing.1.png | Bin 0 -> 162296 bytes
...neau-examples-rest-springboot.Installing.2.png} | Bin
.../juneau-examples-rest-springboot.Running.1.png | Bin 0 -> 98777 bytes
...au-microservice-jetty-template.Installing.1.png | Bin 156973 -> 0 bytes
...au-microservice-jetty-template.Installing.2.png | Bin 103957 -> 0 bytes
...croservice-springboot-template.Installing.1.png | Bin 156973 -> 0 bytes
...croservice-springboot-template.Installing.2.png | Bin 92377 -> 0 bytes
.../my-jetty-microservice.Installing.1.png | Bin 0 -> 159036 bytes
.../my-jetty-microservice.Installing.2.png} | Bin
.../doc-files/my-jetty-microservice.Running.1.png} | Bin
.../my-springboot-microservice.Installing.1.png | Bin 0 -> 162034 bytes
.../my-springboot-microservice.Installing.2.png} | Bin
.../my-springboot-microservice.Running.1.png} | Bin
juneau-doc/src/main/javadoc/overview.html | 935 ++++++++++++++++-----
juneau-doc/src/main/javadoc/resources/docs.txt | 26 +-
.../src/main/javadoc/resources/fragments/toc.html | 32 +-
...examples.cfg => juneau-examples-rest-jetty.cfg} | 0
.../my-jetty-microservice.cfg | 9 +-
59 files changed, 910 insertions(+), 559 deletions(-)
diff --git
a/juneau-doc/docs/Topics/13.juneau-my-jetty-microservice/doc-files/juneau-microservice-jetty-template.Installing.1.png
b/juneau-doc/docs/Topics/13.juneau-my-jetty-microservice/doc-files/juneau-microservice-jetty-template.Installing.1.png
deleted file mode 100755
index 4ea5cec..0000000
Binary files
a/juneau-doc/docs/Topics/13.juneau-my-jetty-microservice/doc-files/juneau-microservice-jetty-template.Installing.1.png
and /dev/null differ
diff --git a/juneau-doc/docs/Topics/13.juneau-my-jetty-microservice.html
b/juneau-doc/docs/Topics/13.my-jetty-microservice.html
similarity index 81%
rename from juneau-doc/docs/Topics/13.juneau-my-jetty-microservice.html
rename to juneau-doc/docs/Topics/13.my-jetty-microservice.html
index 814b99f..dcc6305 100644
--- a/juneau-doc/docs/Topics/13.juneau-my-jetty-microservice.html
+++ b/juneau-doc/docs/Topics/13.my-jetty-microservice.html
@@ -13,7 +13,7 @@
***************************************************************************************************************************/
-->
-{new} juneau-my-jetty-microservice / my-jetty-microservice
+{new} my-jetty-microservice
<h5 class='figure'>Starter Project Zip</h5>
<p class='bpcode w500'>
@@ -22,12 +22,8 @@
<p>
The <l>my-jetty-microservice.zip</l> file is a predefined starter
Eclipse project for developing
- REST microservices using the {@doc juneau-microservice-jetty} package.
+ REST microservices using the {@doc juneau-microservice-jetty
juneau-microservice-jetty} package.
</p>
<p>
It includes a combination of the Juneau Core, Server, and Client APIs
and all libraries needed to execute in a Java 1.8+ environment.
</p>
-<p>
- One significant difference is that we are not using the Juneau {@link
oaj.microservice.Microservice} API for our
- application but instead using the existing Spring Boot API.
-</p>
\ No newline at end of file
diff --git
a/juneau-doc/docs/Topics/13.juneau-my-jetty-microservice/01.Installing.html
b/juneau-doc/docs/Topics/13.my-jetty-microservice/01.Installing.html
similarity index 89%
copy from
juneau-doc/docs/Topics/13.juneau-my-jetty-microservice/01.Installing.html
copy to juneau-doc/docs/Topics/13.my-jetty-microservice/01.Installing.html
index 49fda7c..36aba83 100644
--- a/juneau-doc/docs/Topics/13.juneau-my-jetty-microservice/01.Installing.html
+++ b/juneau-doc/docs/Topics/13.my-jetty-microservice/01.Installing.html
@@ -25,11 +25,11 @@
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-my-jetty-microservice.Installing.1.png'
style='width:549px'>
+ <img class='bordered'
src='doc-files/my-jetty-microservice.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-my-jetty-microservice.Installing.2.png'
style='width:400px'>
+ <img class='bordered'
src='doc-files/my-jetty-microservice.Installing.2.png' style='width:400px'>
</ol>
<p>
The important elements in this project are:
@@ -83,7 +83,7 @@
}
</p>
<li>
- <l>my-microservice.cfg</l> - The external configuration file.
+ <l>my-jetty-microservice.cfg</l> - The external configuration
file.
<br>Contains various useful settings.
<br>Can be used for your own resource configurations.
<br><br>
@@ -118,17 +118,26 @@
#=======================================================================================================================</cc>
<cs>[REST]</cs>
- <cc># URL mappings to static files in the working directory or
classpath.</cc>
- <ck>staticFiles</ck> = htdocs:files/htdocs
+ <cc># Comma-delimited list of key-value pairs that represent locations
of static files that can be served up by your @RestResource-annotated
+ # classes. These are static files that are served up by the servlet
under the specified sub-paths.
+ # For example, given the following setting...
+ # staticFiles = htdocs:my-docs,styles/my-styles
+ # ...the URI "/servletPath/htdocs/javadoc.css" resolves to the path
"/my-docs/javadoc.css".
+ # This path can be relative to the working directory, classpath root,
or package of your resource class.
+ # Used by the BasicRestConfig interface that defines the following
value:
+ # staticFiles="$C{REST/staticFiles}"</cc>
+ <ck>staticFiles</ck> = htdocs:htdocs
- <cc># Stylesheet to use for HTML views.</cc>
+ <cc># Stylesheet to use for HTML views.
+ # Used by the BasicRestConfig interface that defines the following
value:
+ #
stylesheet="$C{REST/theme,servlet:/htdocs/themes/devops.css}"</cc>
<ck>theme</ck> = <cv>servlet:/htdocs/themes/devops.css</cv>
+ <cc># Various look-and-feel settings used in the BasicRestConfig
interface.</cc>
<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}}'>
@@ -154,7 +163,8 @@
<ck>commands</ck> =
<cv>org.apache.juneau.microservice.console.ExitCommand,
org.apache.juneau.microservice.console.RestartCommand,
- org.apache.juneau.microservice.console.HelpCommand</cv>
+ org.apache.juneau.microservice.console.HelpCommand,
+ org.apache.juneau.microservice.console.ConfigCommand</cv>
<cc>#=======================================================================================================================
# Logger settings
diff --git
a/juneau-doc/docs/Topics/13.juneau-my-jetty-microservice/02.Running.html
b/juneau-doc/docs/Topics/13.my-jetty-microservice/02.Running.html
similarity index 79%
copy from juneau-doc/docs/Topics/13.juneau-my-jetty-microservice/02.Running.html
copy to juneau-doc/docs/Topics/13.my-jetty-microservice/02.Running.html
index 244daeb..5876c33 100644
--- a/juneau-doc/docs/Topics/13.juneau-my-jetty-microservice/02.Running.html
+++ b/juneau-doc/docs/Topics/13.my-jetty-microservice/02.Running.html
@@ -16,15 +16,15 @@
{updated} Running in Eclipse
<p>
- The <l>my-microservice.launch</l> file is already provided to allow you
to quickly start
+ The <l>my-jetty-microservice.launch</l> file is already provided to
allow you to quickly start
your new microservice.
</p>
<p>
- Go to <b>Run -> Run Configurations -> Java Application ->
my-microservice</b> and click <b>Run</b>.
+ Go to <b>Run -> Run Configurations -> Java Application ->
my-jetty-microservice</b> and click <b>Run</b>.
<br>In your console view, you should see the following output:
</p>
<p class='bpcode w800'>
- Running class 'RestMicroservice' using config file
'my-microservice.cfg'.
+ Running class 'JettyMicroservice' using config file
'my-jetty-microservice.cfg'.
Server started on port 10000
List of available commands:
@@ -41,8 +41,7 @@
<p class='bpcode w400'>
http://localhost:10000
</p>
-<img class='bordered w400'
src='doc-files/juneau-my-jetty-microservice.Running.1.png'>
+<img class='bordered w400' src='doc-files/my-jetty-microservice.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.
+ You can enter the command <code>exit</code> to shut it down.
</p>
diff --git
a/juneau-doc/docs/Topics/13.juneau-my-jetty-microservice/03.Building.html
b/juneau-doc/docs/Topics/13.my-jetty-microservice/03.Building.html
similarity index 90%
copy from
juneau-doc/docs/Topics/13.juneau-my-jetty-microservice/03.Building.html
copy to juneau-doc/docs/Topics/13.my-jetty-microservice/03.Building.html
index 9da50fa..737cfb9 100644
--- a/juneau-doc/docs/Topics/13.juneau-my-jetty-microservice/03.Building.html
+++ b/juneau-doc/docs/Topics/13.my-jetty-microservice/03.Building.html
@@ -29,20 +29,20 @@
Your <code>target</code> directory should now contain the following
files:
</p>
<ul>
- <li><code>my-microservice-1.0.jar</code>
- <li><code>my-microservice.cfg</code>
+ <li><code>my-jetty-microservice-1.0.jar</code>
+ <li><code>my-jetty-microservice.cfg</code>
</ul>
<p>
To start from a command line, run the following command from inside
your <code>target</code> directory:
</p>
<p class='bpcode w800'>
- java -jar my-microservice-1.0.jar
+ java -jar my-jetty-microservice-1.0.jar
</p>
<p>
You should see the following console output:
</p>
<p class='bpcode w800'>
- Running class 'RestMicroservice' using config file
'my-microservice.cfg'.
+ Running class 'JettyMicroservice' using config file
'my-jetty-microservice.cfg'.
Server started on port 10000
List of available commands:
diff --git
a/juneau-doc/docs/Topics/13.my-jetty-microservice/doc-files/my-jetty-microservice.Installing.1.png
b/juneau-doc/docs/Topics/13.my-jetty-microservice/doc-files/my-jetty-microservice.Installing.1.png
new file mode 100644
index 0000000..3062126
Binary files /dev/null and
b/juneau-doc/docs/Topics/13.my-jetty-microservice/doc-files/my-jetty-microservice.Installing.1.png
differ
diff --git
a/juneau-doc/docs/Topics/13.juneau-my-jetty-microservice/doc-files/juneau-microservice-jetty-template.Installing.2.png
b/juneau-doc/docs/Topics/13.my-jetty-microservice/doc-files/my-jetty-microservice.Installing.2.png
similarity index 100%
copy from
juneau-doc/docs/Topics/13.juneau-my-jetty-microservice/doc-files/juneau-microservice-jetty-template.Installing.2.png
copy to
juneau-doc/docs/Topics/13.my-jetty-microservice/doc-files/my-jetty-microservice.Installing.2.png
diff --git
a/juneau-doc/src/main/javadoc/doc-files/juneau-microservice-springboot-template.Running.1.png
b/juneau-doc/docs/Topics/13.my-jetty-microservice/doc-files/my-jetty-microservice.Running.1.png
similarity index 100%
rename from
juneau-doc/src/main/javadoc/doc-files/juneau-microservice-springboot-template.Running.1.png
rename to
juneau-doc/docs/Topics/13.my-jetty-microservice/doc-files/my-jetty-microservice.Running.1.png
diff --git
a/juneau-doc/docs/Topics/14.juneau-my-springboot-microservice/doc-files/juneau-microservice-springboot-template.Installing.1.png
b/juneau-doc/docs/Topics/14.juneau-my-springboot-microservice/doc-files/juneau-microservice-springboot-template.Installing.1.png
deleted file mode 100755
index 4ea5cec..0000000
Binary files
a/juneau-doc/docs/Topics/14.juneau-my-springboot-microservice/doc-files/juneau-microservice-springboot-template.Installing.1.png
and /dev/null differ
diff --git a/juneau-doc/docs/Topics/14.juneau-my-springboot-microservice.html
b/juneau-doc/docs/Topics/14.my-springboot-microservice.html
similarity index 84%
rename from juneau-doc/docs/Topics/14.juneau-my-springboot-microservice.html
rename to juneau-doc/docs/Topics/14.my-springboot-microservice.html
index ea16b02..c391a76 100644
--- a/juneau-doc/docs/Topics/14.juneau-my-springboot-microservice.html
+++ b/juneau-doc/docs/Topics/14.my-springboot-microservice.html
@@ -13,7 +13,7 @@
***************************************************************************************************************************/
-->
-{new} juneau-my-springboot-microservice / my-springboot-microservice
+{new} my-springboot-microservice
<h5 class='figure'>Starter Project Zip</h5>
<p class='bpcode w500'>
@@ -22,8 +22,12 @@
<p>
The <l>my-springboot-microservice.zip</l> file is a predefined starter
Eclipse project for developing
- REST microservices using the {@doc juneau-rest-server-springboot}
package with Spring Boot.
+ REST microservices using the {@doc juneau-rest-server-springboot
juneau-rest-server-springboot} package with Spring Boot.
</p>
<p>
It includes a combination of the Juneau Core, Server, and Client APIs
and all libraries needed to execute in a Java 1.8+ environment.
</p>
+<p>
+ One significant difference is that we are not using the Juneau {@link
oaj.microservice.Microservice} API for our
+ application but instead using the existing Spring Boot API.
+</p>
\ No newline at end of file
diff --git
a/juneau-doc/docs/Topics/14.juneau-my-springboot-microservice/01.Installing.html
b/juneau-doc/docs/Topics/14.my-springboot-microservice/01.Installing.html
similarity index 81%
copy from
juneau-doc/docs/Topics/14.juneau-my-springboot-microservice/01.Installing.html
copy to juneau-doc/docs/Topics/14.my-springboot-microservice/01.Installing.html
index ac2da02..1e8e2bf 100644
---
a/juneau-doc/docs/Topics/14.juneau-my-springboot-microservice/01.Installing.html
+++ b/juneau-doc/docs/Topics/14.my-springboot-microservice/01.Installing.html
@@ -25,11 +25,11 @@
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-my-springboot-microservice.Installing.1.png'
style='width:549px'>
+ <img class='bordered'
src='doc-files/my-springboot-microservice.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-my-springboot-microservice.Installing.2.png'
style='width:400px'>
+ <img class='bordered'
src='doc-files/my-springboot-microservice.Installing.2.png' style='width:400px'>
</ol>
<p>
The important elements in this project are:
@@ -106,17 +106,26 @@
#=======================================================================================================================</cc>
<cs>[REST]</cs>
- <cc># URL mappings to static files in the working directory or
classpath.</cc>
- <ck>staticFiles</ck> = htdocs:files/htdocs
+ <cc># Comma-delimited list of key-value pairs that represent locations
of static files that can be served up by your @RestResource-annotated
+ # classes. These are static files that are served up by the servlet
under the specified sub-paths.
+ # For example, given the following setting...
+ # staticFiles = htdocs:my-docs,styles/my-styles
+ # ...the URI "/servletPath/htdocs/javadoc.css" resolves to the path
"/my-docs/javadoc.css".
+ # This path can be relative to the working directory, classpath root,
or package of your resource class.
+ # Used by the BasicRestConfig interface that defines the following
value:
+ # staticFiles="$C{REST/staticFiles}"</cc>
+ <ck>staticFiles</ck> = htdocs:htdocs
- <cc># Stylesheet to use for HTML views.</cc>
+ <cc># Stylesheet to use for HTML views.
+ # Used by the BasicRestConfig interface that defines the following
value:
+ #
stylesheet="$C{REST/theme,servlet:/htdocs/themes/devops.css}"</cc>
<ck>theme</ck> = <cv>servlet:/htdocs/themes/devops.css</cv>
+ <cc># Various look-and-feel settings used in the BasicRestConfig
interface.</cc>
<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}}'>
diff --git
a/juneau-doc/docs/Topics/14.juneau-my-springboot-microservice/02.Running.html
b/juneau-doc/docs/Topics/14.my-springboot-microservice/02.Running.html
similarity index 83%
copy from
juneau-doc/docs/Topics/14.juneau-my-springboot-microservice/02.Running.html
copy to juneau-doc/docs/Topics/14.my-springboot-microservice/02.Running.html
index f4e34c7..c4a1329 100644
---
a/juneau-doc/docs/Topics/14.juneau-my-springboot-microservice/02.Running.html
+++ b/juneau-doc/docs/Topics/14.my-springboot-microservice/02.Running.html
@@ -16,11 +16,11 @@
{new} Running in Eclipse
<p>
- The <l>my-microservice.launch</l> file is already provided to allow you
to quickly start
+ The <l>my-springboot-microservice.launch</l> file is already provided
to allow you to quickly start
your new microservice.
</p>
<p>
- Go to <b>Run -> Run Configurations -> Java Application ->
my-microservice</b> and click <b>Run</b>.
+ Go to <b>Run -> Run Configurations -> Java Application ->
my-springboot-microservice</b> and click <b>Run</b>.
<br>In your console view, you should see the following output:
</p>
<p class='bpcode w800'>
@@ -37,13 +37,10 @@
INFO: Started App in 1.999 seconds (JVM running for 2.999)
</p>
<p>
- Now open your browser and point to <l>http://localhost:8080</l>.
+ Now open your browser and point to <l>http://localhost:5000</l>.
You should see the following:
</p>
<p class='bpcode w400'>
- http://localhost:8080
+ http://localhost:5000
</p>
-<img class='bordered w400'
src='doc-files/juneau-my-springboot-microservice.Running.1.png'>
-<p>
- You have started a REST interface on port 8080.
-</p>
+<img class='bordered w400'
src='doc-files/my-springboot-microservice.Running.1.png'>
diff --git
a/juneau-doc/docs/Topics/14.juneau-my-springboot-microservice/03.Building.html
b/juneau-doc/docs/Topics/14.my-springboot-microservice/03.Building.html
similarity index 95%
copy from
juneau-doc/docs/Topics/14.juneau-my-springboot-microservice/03.Building.html
copy to juneau-doc/docs/Topics/14.my-springboot-microservice/03.Building.html
index bca2bc6..90006b7 100644
---
a/juneau-doc/docs/Topics/14.juneau-my-springboot-microservice/03.Building.html
+++ b/juneau-doc/docs/Topics/14.my-springboot-microservice/03.Building.html
@@ -29,13 +29,13 @@
Your <code>target</code> directory should now contain the following
files:
</p>
<ul>
- <li><code>my-microservice-1.0.jar</code>
+ <li><code>my-springboot-microservice-1.0.jar</code>
</ul>
<p>
To start from a command line, run the following command from inside
your <code>target</code> directory:
</p>
<p class='bpcode w800'>
- java -jar my-microservice-1.0.jar
+ java -jar my-springboot-microservice-1.0.jar
</p>
<p>
You should see the following console output:
diff --git
a/juneau-doc/docs/Topics/14.my-springboot-microservice/doc-files/my-springboot-microservice.Installing.1.png
b/juneau-doc/docs/Topics/14.my-springboot-microservice/doc-files/my-springboot-microservice.Installing.1.png
new file mode 100644
index 0000000..9611f85
Binary files /dev/null and
b/juneau-doc/docs/Topics/14.my-springboot-microservice/doc-files/my-springboot-microservice.Installing.1.png
differ
diff --git
a/juneau-doc/docs/Topics/14.juneau-my-springboot-microservice/doc-files/juneau-microservice-springboot-template.Installing.2.png
b/juneau-doc/docs/Topics/14.my-springboot-microservice/doc-files/my-springboot-microservice.Installing.2.png
similarity index 100%
copy from
juneau-doc/docs/Topics/14.juneau-my-springboot-microservice/doc-files/juneau-microservice-springboot-template.Installing.2.png
copy to
juneau-doc/docs/Topics/14.my-springboot-microservice/doc-files/my-springboot-microservice.Installing.2.png
diff --git
a/juneau-doc/src/main/javadoc/doc-files/juneau-microservice-jetty-template.Running.1.png
b/juneau-doc/docs/Topics/14.my-springboot-microservice/doc-files/my-springboot-microservice.Running.1.png
similarity index 100%
rename from
juneau-doc/src/main/javadoc/doc-files/juneau-microservice-jetty-template.Running.1.png
rename to
juneau-doc/docs/Topics/14.my-springboot-microservice/doc-files/my-springboot-microservice.Running.1.png
diff --git a/juneau-doc/docs/Topics/15.juneau-examples-core.html
b/juneau-doc/docs/Topics/15.juneau-examples-core.html
index a1c9e28..930eb82 100644
--- a/juneau-doc/docs/Topics/15.juneau-examples-core.html
+++ b/juneau-doc/docs/Topics/15.juneau-examples-core.html
@@ -13,7 +13,7 @@
***************************************************************************************************************************/
-->
-juneau-examples-core
+{updated} juneau-examples-core
<h5 class='figure'>Archive File</h5>
<p class='bpcode w500'>
@@ -23,27 +23,3 @@ juneau-examples-core
<p>
The <code>juneau-examples-core</code> project contains various code
examples for using the core APIs.
</p>
-<p>
- The project project can be loaded into your workspace by importing the
- <code>juneau-examples-core-{@property juneauVersion}.zip</code> file.
-</p>
-
-<h5 class='topic'>juneau-examples-core install instructions</h5>
-<p>
- Download the <code>juneau-examples-core-{@property
juneauVersion}.zip</code> file from the downloads page
- (located in the binaries) and import it into your workspace as an
existing project:
-</p>
-<img class='bordered' src='doc-files/juneau-examples-core.1.png'
style='width:512px'>
-<p>
- Select the archive file and import the project:
-</p>
-<img class='bordered' src='doc-files/juneau-examples-core.2.png'
style='width:523px'>
-<p>
- Once loaded, you should see the following project structure:
-</p>
-<img class='bordered' src='doc-files/juneau-examples-core.3.png'
style='width:459px'>
-
-<p>
- The Core library samples are currently a work-in-progress so there's
not much here yet.
- This section will be updated as new code is added.
-</p>
diff --git a/juneau-doc/docs/Topics/15.juneau-examples-core.html
b/juneau-doc/docs/Topics/15.juneau-examples-core/01.Installing.html
similarity index 79%
copy from juneau-doc/docs/Topics/15.juneau-examples-core.html
copy to juneau-doc/docs/Topics/15.juneau-examples-core/01.Installing.html
index a1c9e28..85efcd8 100644
--- a/juneau-doc/docs/Topics/15.juneau-examples-core.html
+++ b/juneau-doc/docs/Topics/15.juneau-examples-core/01.Installing.html
@@ -13,22 +13,11 @@
***************************************************************************************************************************/
-->
-juneau-examples-core
+{new} Installing in Eclipse
-<h5 class='figure'>Archive File</h5>
-<p class='bpcode w500'>
- juneau-examples-core-{@property juneauVersion}.zip
-</p>
-
-<p>
- The <code>juneau-examples-core</code> project contains various code
examples for using the core APIs.
-</p>
<p>
- The project project can be loaded into your workspace by importing the
- <code>juneau-examples-core-{@property juneauVersion}.zip</code> file.
-</p>
-
-<h5 class='topic'>juneau-examples-core install instructions</h5>
+ Follow these instructions to import the Juneau project into Eclipse.
+</p>
<p>
Download the <code>juneau-examples-core-{@property
juneauVersion}.zip</code> file from the downloads page
(located in the binaries) and import it into your workspace as an
existing project:
diff --git a/juneau-doc/docs/Topics/15.juneau-examples-core/01.Examples.html
b/juneau-doc/docs/Topics/15.juneau-examples-core/02.Examples.html
similarity index 100%
rename from juneau-doc/docs/Topics/15.juneau-examples-core/01.Examples.html
rename to juneau-doc/docs/Topics/15.juneau-examples-core/02.Examples.html
diff --git a/juneau-doc/docs/Topics/17.juneau-examples-rest-jetty.html
b/juneau-doc/docs/Topics/17.juneau-examples-rest-jetty.html
index 090a94d..cf24241 100644
--- a/juneau-doc/docs/Topics/17.juneau-examples-rest-jetty.html
+++ b/juneau-doc/docs/Topics/17.juneau-examples-rest-jetty.html
@@ -13,7 +13,7 @@
***************************************************************************************************************************/
-->
-{todo} juneau-examples-rest-jetty
+{new} juneau-examples-rest-jetty
<h5 class='figure'>Starter Project Zip</h5>
<p class='bpcode w500'>
@@ -24,26 +24,3 @@
The <code>juneau-examples-rest-jetty</code> project includes everything
you need create a Samples REST
microservice in an Eclipse workspace and build it as an executable jar.
</p>
-
-<h5 class='topic'>juneau-examples-rest install instructions</h5>
-<p>
- Download the <code>juneau-examples-rest-{@property
juneauVersion}.zip</code> file from the downloads page
- (located in the binaries) and import it into your workspace as an
existing project:
-</p>
-<img class='bordered' src='doc-files/juneau-examples-rest.1.png'
style='width:524px'>
-<p>
- Select the archive file and import the project:
-</p>
-<img class='bordered' src='doc-files/juneau-examples-rest.2.png'
style='width:523px'>
-<p>
- Once loaded, you should see the following project structure:
-</p>
-<img class='bordered' src='doc-files/juneau-examples-rest.3.png'
style='width:325px'>
-<p>
- The microservice can be started from the
<code>juneau-examples-rest.launch</code> file.
- It will start up the microservice on port 10000 which you can then view
through a browser:
-</p>
-<p class='bpcode w400'>
- http://localhost:10000
-</p>
-<img class='bordered w400' src='doc-files/juneau-examples-rest.4.png'>
diff --git
a/juneau-doc/docs/Topics/17.juneau-examples-rest-jetty/01.Classes.html
b/juneau-doc/docs/Topics/17.juneau-examples-rest-jetty/01.Classes.html
deleted file mode 100644
index 9e57646..0000000
--- a/juneau-doc/docs/Topics/17.juneau-examples-rest-jetty/01.Classes.html
+++ /dev/null
@@ -1,56 +0,0 @@
-<!--
-/***************************************************************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file
- * distributed with this work for additional information regarding copyright
ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
or implied. See the License for the
- * specific language governing permissions and limitations under the License.
-
***************************************************************************************************************************/
- -->
-
-{todo} Classes
-
-<p>
- The <code>juneau-examples-rest-springboot</code> project contains the
same classes as found in <code>juneau-examples-rest</code>
- with the inclusion of a
<code>org.apache.juneau.examples.rest.springboot</code> package containing the
following:
-</p>
-<img class='bordered w800'
src='doc-files/juneau-examples-rest-springboot.Classes.png'>
-<p>
- The <code>App</code> class is used to invoke our application using
Spring:
-</p>
-<p class='bpcode w800'>
- <ja>@SpringBootApplication</ja>
- <ja>@Controller</ja>
- <ja>@Import</ja>({AppConfiguration.<jk>class</jk>,
AppServletConfiguration.<jk>class</jk>})
- <jk>public class</jk> App {
-
- <jk>private static volatile</jk> ConfigurableApplicationContext
<jsf>context</jsf>;
-
- <jk>public static void</jk> main(String[] args) {
- <jk>try</jk> {
-
<jsm>setProperty</jsm>(<js>"juneau.configFile"</js>, <js>"examples.cfg"</js>,
<jk>false</jk>);
- <jsf>context</jsf> =
SpringApplication.<jsm>run</jsm>(App.<jk>class</jk>, args);
- <jk>if</jk> (<jsf>context</jsf> ==
<jk>null</jk>)
- System.<jsm>exit</jsm>(2); <jc>//
Probably port in use?</jc>
-
AppConfiguration.<jsm>setAppContext</jsm>(context);
-
<jsm>setProperty</jsm>(<js>"juneau.serverPort"</js>,
<jsf>context</jsf>.getEnvironment().getProperty(<js>"server.port"</js>),
<jk>false</jk>);
- } <jk>catch</jk> (Exception e) {
- e.printStackTrace();
- }
- }
-
- <jk>public static void</jk> start() {
- <jsm>main</jsm>(<jk>new</jk> String[0]);
- }
-
- <jk>public static void</jk> stop() {
- <jsf>context</jsf>.stop();
- }
- }
-</p>
-
diff --git
a/juneau-doc/docs/Topics/13.juneau-my-jetty-microservice/01.Installing.html
b/juneau-doc/docs/Topics/17.juneau-examples-rest-jetty/01.Installing.html
similarity index 77%
rename from
juneau-doc/docs/Topics/13.juneau-my-jetty-microservice/01.Installing.html
rename to
juneau-doc/docs/Topics/17.juneau-examples-rest-jetty/01.Installing.html
index 49fda7c..40669c9 100644
--- a/juneau-doc/docs/Topics/13.juneau-my-jetty-microservice/01.Installing.html
+++ b/juneau-doc/docs/Topics/17.juneau-examples-rest-jetty/01.Installing.html
@@ -13,23 +13,23 @@
***************************************************************************************************************************/
-->
-{updated} Installing in Eclipse
+{new} Installing in Eclipse
<p>
- Follow these instructions to create a new template project in Eclipse.
+ Follow these instructions to import the REST examples project using
Jetty into Eclipse.
</p>
<ol class='spaced-list'>
<li>
- Download the latest <l>my-jetty-microservice.zip</l> file.
+ Download the latest <l>juneau-examples-rest-jetty.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-my-jetty-microservice.Installing.1.png'
style='width:549px'>
+ <img class='bordered'
src='doc-files/juneau-examples-rest-jetty.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-my-jetty-microservice.Installing.2.png'
style='width:400px'>
+ <img class='bordered'
src='doc-files/juneau-examples-rest-jetty.Installing.2.png' style='width:400px'>
</ol>
<p>
The important elements in this project are:
@@ -60,22 +60,44 @@
<br><br>
<p class='bcode w800'>
<ja>@RestResource</ja>(
- path=<js>"/"</js>,
- title=<js>"My Microservice"</js>,
- description=<js>"Top-level resources page"</js>,
+ path=<js>"/*"</js>,
+ title=<js>"Root resources"</js>,
+ description=<js>"Example of a router resource page."</js>,
htmldoc=<ja>@HtmlDoc</ja>(
widgets={
ContentTypeMenuItem.<jk>class</jk>,
- StyleMenuItem.<jk>class</jk>
+ ThemeMenuItem.<jk>class</jk>
},
navlinks={
- <js>"options: servlet:/?method=OPTIONS"</js>
+ <js>"options: ?method=OPTIONS"</js>,
+ <js>"$W{ContentTypeMenuItem}"</js>,
+ <js>"$W{ThemeMenuItem}"</js>,
+ <js>"source:
$C{Source/gitHub}/org/apache/juneau/examples/rest/$R{servletClassSimple}.java"</js>
+ },
+ aside={
+ <js>"<div style='max-width:400px'
class='text'>"</js>,
+ <js>" <p>This is an example of a
'router' page that serves as a jumping-off point to child
resources.</p>"</js>,
+ <js>" <p>Resources can be nested
arbitrarily deep through router pages.</p>"</js>,
+ <js>" <p>Note the <span
class='link'>options</span> link provided that lets you see the
generated swagger doc for this page.</p>"</js>,
+ <js>" <p>Also note the <span
class='link'>sources</span> link on these pages to view the source
code for the page.</p>"</js>,
+ <js>" <p>All content on pages in the UI
are serialized POJOs. In this case, it's a serialized array of beans with 2
properties, 'name' and 'description'.</p>"</js>,
+ <js>" <p>Other features (such as this
aside) are added through annotations.</p>"</js>,
+ <js>"</div>"</js>
}
),
+ properties={
+ <jc>// For testing purposes, we want to use single
quotes in all the serializers so it's easier to do simple
+ // String comparisons.
+ // You can apply any of the
Serializer/Parser/BeanContext settings this way.</jc>
+
<ja>@Property</ja>(name=<jsf>WSERIALIZER_quoteChar</jsf>, value=<js>"'"</js>)
+ },
children={
HelloWorldResource.<jk>class</jk>,
+ PetStoreResource.<jk>class</jk>,
+ DtoExamples.<jk>class</jk>,
ConfigResource.<jk>class</jk>,
- LogsResource.<jk>class</jk>
+ LogsResource.<jk>class</jk>,
+ ShutdownResource.<jk>class</jk>
}
)
<jk>public class</jk> RootResources <jk>extends</jk>
BasicRestServletJenaGroup {
@@ -83,7 +105,7 @@
}
</p>
<li>
- <l>my-microservice.cfg</l> - The external configuration file.
+ <l>juneau-examples-rest-jetty.cfg</l> - The external
configuration file.
<br>Contains various useful settings.
<br>Can be used for your own resource configurations.
<br><br>
@@ -118,17 +140,26 @@
#=======================================================================================================================</cc>
<cs>[REST]</cs>
- <cc># URL mappings to static files in the working directory or
classpath.</cc>
- <ck>staticFiles</ck> = htdocs:files/htdocs
+ <cc># Comma-delimited list of key-value pairs that represent locations
of static files that can be served up by your @RestResource-annotated
+ # classes. These are static files that are served up by the servlet
under the specified sub-paths.
+ # For example, given the following setting...
+ # staticFiles = htdocs:my-docs,styles/my-styles
+ # ...the URI "/servletPath/htdocs/javadoc.css" resolves to the path
"/my-docs/javadoc.css".
+ # This path can be relative to the working directory, classpath root,
or package of your resource class.
+ # Used by the BasicRestConfig interface that defines the following
value:
+ # staticFiles="$C{REST/staticFiles}"</cc>
+ <ck>staticFiles</ck> = htdocs:htdocs
- <cc># Stylesheet to use for HTML views.</cc>
+ <cc># Stylesheet to use for HTML views.
+ # Used by the BasicRestConfig interface that defines the following
value:
+ #
stylesheet="$C{REST/theme,servlet:/htdocs/themes/devops.css}"</cc>
<ck>theme</ck> = <cv>servlet:/htdocs/themes/devops.css</cv>
+ <cc># Various look-and-feel settings used in the BasicRestConfig
interface.</cc>
<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}}'>
@@ -154,7 +185,8 @@
<ck>commands</ck> =
<cv>org.apache.juneau.microservice.console.ExitCommand,
org.apache.juneau.microservice.console.RestartCommand,
- org.apache.juneau.microservice.console.HelpCommand</cv>
+ org.apache.juneau.microservice.console.HelpCommand,
+ org.apache.juneau.microservice.console.ConfigCommand</cv>
<cc>#=======================================================================================================================
# Logger settings
diff --git
a/juneau-doc/docs/Topics/17.juneau-examples-rest-jetty/02.DeployingToHeroku.html
b/juneau-doc/docs/Topics/17.juneau-examples-rest-jetty/02.DeployingToHeroku.html
deleted file mode 100644
index 8f71344..0000000
---
a/juneau-doc/docs/Topics/17.juneau-examples-rest-jetty/02.DeployingToHeroku.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<!--
-/***************************************************************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file
- * distributed with this work for additional information regarding copyright
ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
or implied. See the License for the
- * specific language governing permissions and limitations under the License.
-
***************************************************************************************************************************/
- -->
-
-{todo} Deploying to Heroku
-
-<p>
- TODO
-</p>
diff --git
a/juneau-doc/docs/Topics/13.juneau-my-jetty-microservice/02.Running.html
b/juneau-doc/docs/Topics/17.juneau-examples-rest-jetty/02.Running.html
similarity index 78%
rename from
juneau-doc/docs/Topics/13.juneau-my-jetty-microservice/02.Running.html
rename to juneau-doc/docs/Topics/17.juneau-examples-rest-jetty/02.Running.html
index 244daeb..649f50e 100644
--- a/juneau-doc/docs/Topics/13.juneau-my-jetty-microservice/02.Running.html
+++ b/juneau-doc/docs/Topics/17.juneau-examples-rest-jetty/02.Running.html
@@ -13,18 +13,18 @@
***************************************************************************************************************************/
-->
-{updated} Running in Eclipse
+{new} Running in Eclipse
<p>
- The <l>my-microservice.launch</l> file is already provided to allow you
to quickly start
+ The <l>juneau-examples-rest-jetty.launch</l> file is already provided
to allow you to quickly start
your new microservice.
</p>
<p>
- Go to <b>Run -> Run Configurations -> Java Application ->
my-microservice</b> and click <b>Run</b>.
+ Go to <b>Run -> Run Configurations -> Java Application ->
juneau-examples-rest-jetty</b> and click <b>Run</b>.
<br>In your console view, you should see the following output:
</p>
<p class='bpcode w800'>
- Running class 'RestMicroservice' using config file
'my-microservice.cfg'.
+ Running class 'JettyMicroservice' using config file
'juneau-examples-rest-jetty.cfg'.
Server started on port 10000
List of available commands:
@@ -41,8 +41,7 @@
<p class='bpcode w400'>
http://localhost:10000
</p>
-<img class='bordered w400'
src='doc-files/juneau-my-jetty-microservice.Running.1.png'>
+<img class='bordered w400'
src='doc-files/juneau-examples-rest-jetty.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.
+ You can enter the command <code>exit</code> to shut it down.
</p>
diff --git
a/juneau-doc/docs/Topics/13.juneau-my-jetty-microservice/03.Building.html
b/juneau-doc/docs/Topics/17.juneau-examples-rest-jetty/03.Building.html
similarity index 82%
rename from
juneau-doc/docs/Topics/13.juneau-my-jetty-microservice/03.Building.html
rename to juneau-doc/docs/Topics/17.juneau-examples-rest-jetty/03.Building.html
index 9da50fa..ec76ef7 100644
--- a/juneau-doc/docs/Topics/13.juneau-my-jetty-microservice/03.Building.html
+++ b/juneau-doc/docs/Topics/17.juneau-examples-rest-jetty/03.Building.html
@@ -13,14 +13,14 @@
***************************************************************************************************************************/
-->
-{updated} Building and Running from Command-Line
+{new} Building and Running from Command-Line
<p>
- The <l>pom.xml</l> file is a basic Maven build script for creating your
microservice
+ The <l>pom.xml</l> file is a basic Maven build script for creating the
examples microservice
as an executable uber-jar.
</p>
<p>
- The easiest way to build your microservice is to run the following from
the project root.
+ The easiest way to build the microservice is to run the following from
the project root.
</p>
<p class='bpcode w800'>
mvn clean install
@@ -29,20 +29,20 @@
Your <code>target</code> directory should now contain the following
files:
</p>
<ul>
- <li><code>my-microservice-1.0.jar</code>
- <li><code>my-microservice.cfg</code>
+ <li><code>juneau-examples-rest-jetty-1.0.jar</code>
+ <li><code>juneau-examples-rest-jetty.cfg</code>
</ul>
<p>
To start from a command line, run the following command from inside
your <code>target</code> directory:
</p>
<p class='bpcode w800'>
- java -jar my-microservice-1.0.jar
+ java -jar juneau-examples-rest-jetty-1.0.jar
</p>
<p>
You should see the following console output:
</p>
<p class='bpcode w800'>
- Running class 'RestMicroservice' using config file
'my-microservice.cfg'.
+ Running class 'JettyMicroservice' using config file
'juneau-examples-rest-jetty.cfg'.
Server started on port 10000
List of available commands:
diff --git
a/juneau-doc/docs/Topics/17.juneau-examples-rest-jetty/doc-files/juneau-examples-rest-jetty.Installing.1.png
b/juneau-doc/docs/Topics/17.juneau-examples-rest-jetty/doc-files/juneau-examples-rest-jetty.Installing.1.png
new file mode 100644
index 0000000..38ffe39
Binary files /dev/null and
b/juneau-doc/docs/Topics/17.juneau-examples-rest-jetty/doc-files/juneau-examples-rest-jetty.Installing.1.png
differ
diff --git
a/juneau-doc/docs/Topics/17.juneau-examples-rest-jetty/doc-files/juneau-microservice-rest-jetty.Installing.2.png
b/juneau-doc/docs/Topics/17.juneau-examples-rest-jetty/doc-files/juneau-examples-rest-jetty.Installing.2.png
similarity index 100%
copy from
juneau-doc/docs/Topics/17.juneau-examples-rest-jetty/doc-files/juneau-microservice-rest-jetty.Installing.2.png
copy to
juneau-doc/docs/Topics/17.juneau-examples-rest-jetty/doc-files/juneau-examples-rest-jetty.Installing.2.png
diff --git
a/juneau-doc/docs/Topics/17.juneau-examples-rest-jetty/doc-files/juneau-examples-rest-jetty.Running.1.png
b/juneau-doc/docs/Topics/17.juneau-examples-rest-jetty/doc-files/juneau-examples-rest-jetty.Running.1.png
new file mode 100644
index 0000000..3eff3a5
Binary files /dev/null and
b/juneau-doc/docs/Topics/17.juneau-examples-rest-jetty/doc-files/juneau-examples-rest-jetty.Running.1.png
differ
diff --git a/juneau-doc/docs/Topics/18.juneau-examples-rest-springboot.html
b/juneau-doc/docs/Topics/18.juneau-examples-rest-springboot.html
index 1c1f25d..44dbe14 100644
--- a/juneau-doc/docs/Topics/18.juneau-examples-rest-springboot.html
+++ b/juneau-doc/docs/Topics/18.juneau-examples-rest-springboot.html
@@ -13,7 +13,7 @@
***************************************************************************************************************************/
-->
-{todo} juneau-examples-rest-springboot
+{new} juneau-examples-rest-springboot
<h5 class='figure'>Starter Project Zip</h5>
<p class='bpcode w500'>
@@ -34,14 +34,3 @@
<li>
Configuration files for deploying the microservice to Heroku.
</ul>
-
-<p>
- The microservice app can be imported into Eclipse just like
<code>juneau-examples-rest</code>.
-</p>
-<p>
- The microservice can be started from the
<code>juneau-examples-rest-springboot.launch</code> file.
- It will start up the microservice on port 5000 which you can then view
through a browser.
-</p>
-<p>
- The Spring Boot examples app has identical functionality to the normal
examples app except for console command support.
-</p>
\ No newline at end of file
diff --git
a/juneau-doc/docs/Topics/18.juneau-examples-rest-springboot/01.Classes.html
b/juneau-doc/docs/Topics/18.juneau-examples-rest-springboot/01.Classes.html
deleted file mode 100644
index 9e57646..0000000
--- a/juneau-doc/docs/Topics/18.juneau-examples-rest-springboot/01.Classes.html
+++ /dev/null
@@ -1,56 +0,0 @@
-<!--
-/***************************************************************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file
- * distributed with this work for additional information regarding copyright
ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
or implied. See the License for the
- * specific language governing permissions and limitations under the License.
-
***************************************************************************************************************************/
- -->
-
-{todo} Classes
-
-<p>
- The <code>juneau-examples-rest-springboot</code> project contains the
same classes as found in <code>juneau-examples-rest</code>
- with the inclusion of a
<code>org.apache.juneau.examples.rest.springboot</code> package containing the
following:
-</p>
-<img class='bordered w800'
src='doc-files/juneau-examples-rest-springboot.Classes.png'>
-<p>
- The <code>App</code> class is used to invoke our application using
Spring:
-</p>
-<p class='bpcode w800'>
- <ja>@SpringBootApplication</ja>
- <ja>@Controller</ja>
- <ja>@Import</ja>({AppConfiguration.<jk>class</jk>,
AppServletConfiguration.<jk>class</jk>})
- <jk>public class</jk> App {
-
- <jk>private static volatile</jk> ConfigurableApplicationContext
<jsf>context</jsf>;
-
- <jk>public static void</jk> main(String[] args) {
- <jk>try</jk> {
-
<jsm>setProperty</jsm>(<js>"juneau.configFile"</js>, <js>"examples.cfg"</js>,
<jk>false</jk>);
- <jsf>context</jsf> =
SpringApplication.<jsm>run</jsm>(App.<jk>class</jk>, args);
- <jk>if</jk> (<jsf>context</jsf> ==
<jk>null</jk>)
- System.<jsm>exit</jsm>(2); <jc>//
Probably port in use?</jc>
-
AppConfiguration.<jsm>setAppContext</jsm>(context);
-
<jsm>setProperty</jsm>(<js>"juneau.serverPort"</js>,
<jsf>context</jsf>.getEnvironment().getProperty(<js>"server.port"</js>),
<jk>false</jk>);
- } <jk>catch</jk> (Exception e) {
- e.printStackTrace();
- }
- }
-
- <jk>public static void</jk> start() {
- <jsm>main</jsm>(<jk>new</jk> String[0]);
- }
-
- <jk>public static void</jk> stop() {
- <jsf>context</jsf>.stop();
- }
- }
-</p>
-
diff --git
a/juneau-doc/docs/Topics/14.juneau-my-springboot-microservice/01.Installing.html
b/juneau-doc/docs/Topics/18.juneau-examples-rest-springboot/01.Installing.html
similarity index 68%
rename from
juneau-doc/docs/Topics/14.juneau-my-springboot-microservice/01.Installing.html
rename to
juneau-doc/docs/Topics/18.juneau-examples-rest-springboot/01.Installing.html
index ac2da02..95c4c02 100644
---
a/juneau-doc/docs/Topics/14.juneau-my-springboot-microservice/01.Installing.html
+++
b/juneau-doc/docs/Topics/18.juneau-examples-rest-springboot/01.Installing.html
@@ -16,20 +16,20 @@
{new} Installing in Eclipse
<p>
- Follow these instructions to create a new template project in Eclipse.
+ Follow these instructions to import the REST examples project using
Spring Boot into Eclipse.
</p>
<ol class='spaced-list'>
<li>
- Download the latest <l>my-springboot-microservice.zip</l> file.
+ Download the latest <l>juneau-examples-rest-springboot.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-my-springboot-microservice.Installing.1.png'
style='width:549px'>
+ <img class='bordered'
src='doc-files/juneau-examples-rest-springboot.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-my-springboot-microservice.Installing.2.png'
style='width:400px'>
+ <img class='bordered'
src='doc-files/juneau-examples-rest-springboot.Installing.2.png'
style='width:400px'>
</ol>
<p>
The important elements in this project are:
@@ -61,27 +61,48 @@
</p>
<li>
<l>RootResources.java</l> - The top-level REST resource.
- <br>This class routes HTTP requests to child resources.
- <br>This is identical to the Jetty example.
+ <br>This class routes HTTP requests to child resources:
<br><br>
<p class='bcode w800'>
<ja>@RestResource</ja>(
- path=<js>"/"</js>,
- title=<js>"My Microservice"</js>,
- description=<js>"Top-level resources page"</js>,
+ path=<js>"/*"</js>,
+ title=<js>"Root resources"</js>,
+ description=<js>"Example of a router resource page."</js>,
htmldoc=<ja>@HtmlDoc</ja>(
widgets={
ContentTypeMenuItem.<jk>class</jk>,
- StyleMenuItem.<jk>class</jk>
+ ThemeMenuItem.<jk>class</jk>
},
navlinks={
- <js>"options: servlet:/?method=OPTIONS"</js>
+ <js>"options: ?method=OPTIONS"</js>,
+ <js>"$W{ContentTypeMenuItem}"</js>,
+ <js>"$W{ThemeMenuItem}"</js>,
+ <js>"source:
$C{Source/gitHub}/org/apache/juneau/examples/rest/$R{servletClassSimple}.java"</js>
+ },
+ aside={
+ <js>"<div style='max-width:400px'
class='text'>"</js>,
+ <js>" <p>This is an example of a
'router' page that serves as a jumping-off point to child
resources.</p>"</js>,
+ <js>" <p>Resources can be nested
arbitrarily deep through router pages.</p>"</js>,
+ <js>" <p>Note the <span
class='link'>options</span> link provided that lets you see the
generated swagger doc for this page.</p>"</js>,
+ <js>" <p>Also note the <span
class='link'>sources</span> link on these pages to view the source
code for the page.</p>"</js>,
+ <js>" <p>All content on pages in the UI
are serialized POJOs. In this case, it's a serialized array of beans with 2
properties, 'name' and 'description'.</p>"</js>,
+ <js>" <p>Other features (such as this
aside) are added through annotations.</p>"</js>,
+ <js>"</div>"</js>
}
),
+ properties={
+ <jc>// For testing purposes, we want to use single
quotes in all the serializers so it's easier to do simple
+ // String comparisons.
+ // You can apply any of the
Serializer/Parser/BeanContext settings this way.</jc>
+
<ja>@Property</ja>(name=<jsf>WSERIALIZER_quoteChar</jsf>, value=<js>"'"</js>)
+ },
children={
HelloWorldResource.<jk>class</jk>,
+ PetStoreResource.<jk>class</jk>,
+ DtoExamples.<jk>class</jk>,
ConfigResource.<jk>class</jk>,
- LogsResource.<jk>class</jk>
+ LogsResource.<jk>class</jk>,
+ ShutdownResource.<jk>class</jk>
}
)
<jk>public class</jk> RootResources <jk>extends</jk>
BasicRestServletJenaGroup {
diff --git
a/juneau-doc/docs/Topics/14.juneau-my-springboot-microservice/02.Running.html
b/juneau-doc/docs/Topics/18.juneau-examples-rest-springboot/02.Running.html
similarity index 83%
rename from
juneau-doc/docs/Topics/14.juneau-my-springboot-microservice/02.Running.html
rename to
juneau-doc/docs/Topics/18.juneau-examples-rest-springboot/02.Running.html
index f4e34c7..ce765a5 100644
---
a/juneau-doc/docs/Topics/14.juneau-my-springboot-microservice/02.Running.html
+++ b/juneau-doc/docs/Topics/18.juneau-examples-rest-springboot/02.Running.html
@@ -16,11 +16,11 @@
{new} Running in Eclipse
<p>
- The <l>my-microservice.launch</l> file is already provided to allow you
to quickly start
+ The <l>juneau-examples-rest-springboot.launch</l> file is already
provided to allow you to quickly start
your new microservice.
</p>
<p>
- Go to <b>Run -> Run Configurations -> Java Application ->
my-microservice</b> and click <b>Run</b>.
+ Go to <b>Run -> Run Configurations -> Java Application ->
juneau-examples-rest-springboot</b> and click <b>Run</b>.
<br>In your console view, you should see the following output:
</p>
<p class='bpcode w800'>
@@ -37,13 +37,10 @@
INFO: Started App in 1.999 seconds (JVM running for 2.999)
</p>
<p>
- Now open your browser and point to <l>http://localhost:8080</l>.
+ Now open your browser and point to <l>http://localhost:5000</l>.
You should see the following:
</p>
<p class='bpcode w400'>
- http://localhost:8080
+ http://localhost:5000
</p>
-<img class='bordered w400'
src='doc-files/juneau-my-springboot-microservice.Running.1.png'>
-<p>
- You have started a REST interface on port 8080.
-</p>
+<img class='bordered w400'
src='doc-files/juneau-examples-rest-springboot.Running.1.png'>
diff --git
a/juneau-doc/docs/Topics/14.juneau-my-springboot-microservice/03.Building.html
b/juneau-doc/docs/Topics/18.juneau-examples-rest-springboot/03.Building.html
similarity index 95%
rename from
juneau-doc/docs/Topics/14.juneau-my-springboot-microservice/03.Building.html
rename to
juneau-doc/docs/Topics/18.juneau-examples-rest-springboot/03.Building.html
index bca2bc6..2f30bd6 100644
---
a/juneau-doc/docs/Topics/14.juneau-my-springboot-microservice/03.Building.html
+++ b/juneau-doc/docs/Topics/18.juneau-examples-rest-springboot/03.Building.html
@@ -29,13 +29,13 @@
Your <code>target</code> directory should now contain the following
files:
</p>
<ul>
- <li><code>my-microservice-1.0.jar</code>
+ <li><code>juneau-examples-rest-springboot-1.0.jar</code>
</ul>
<p>
To start from a command line, run the following command from inside
your <code>target</code> directory:
</p>
<p class='bpcode w800'>
- java -jar my-microservice-1.0.jar
+ java -jar juneau-examples-rest-springboot-1.0.jar
</p>
<p>
You should see the following console output:
diff --git
a/juneau-doc/docs/Topics/18.juneau-examples-rest-springboot/02.DeployingToHeroku.html
b/juneau-doc/docs/Topics/18.juneau-examples-rest-springboot/04.DeployingToHeroku.html
similarity index 100%
rename from
juneau-doc/docs/Topics/18.juneau-examples-rest-springboot/02.DeployingToHeroku.html
rename to
juneau-doc/docs/Topics/18.juneau-examples-rest-springboot/04.DeployingToHeroku.html
diff --git
a/juneau-doc/docs/Topics/18.juneau-examples-rest-springboot/doc-files/juneau-examples-rest-springboot.Installing.1.png
b/juneau-doc/docs/Topics/18.juneau-examples-rest-springboot/doc-files/juneau-examples-rest-springboot.Installing.1.png
new file mode 100644
index 0000000..045030b
Binary files /dev/null and
b/juneau-doc/docs/Topics/18.juneau-examples-rest-springboot/doc-files/juneau-examples-rest-springboot.Installing.1.png
differ
diff --git
a/juneau-doc/docs/Topics/18.juneau-examples-rest-springboot/doc-files/juneau-examples-rest-springboot-Installing.2.png
b/juneau-doc/docs/Topics/18.juneau-examples-rest-springboot/doc-files/juneau-examples-rest-springboot.Installing.2.png
similarity index 100%
copy from
juneau-doc/docs/Topics/18.juneau-examples-rest-springboot/doc-files/juneau-examples-rest-springboot-Installing.2.png
copy to
juneau-doc/docs/Topics/18.juneau-examples-rest-springboot/doc-files/juneau-examples-rest-springboot.Installing.2.png
diff --git
a/juneau-doc/docs/Topics/18.juneau-examples-rest-springboot/doc-files/juneau-examples-rest-springboot.Running.1.png
b/juneau-doc/docs/Topics/18.juneau-examples-rest-springboot/doc-files/juneau-examples-rest-springboot.Running.1.png
new file mode 100644
index 0000000..3eff3a5
Binary files /dev/null and
b/juneau-doc/docs/Topics/18.juneau-examples-rest-springboot/doc-files/juneau-examples-rest-springboot.Running.1.png
differ
diff --git
a/juneau-doc/src/main/javadoc/doc-files/juneau-examples-rest-jetty.Installing.1.png
b/juneau-doc/src/main/javadoc/doc-files/juneau-examples-rest-jetty.Installing.1.png
new file mode 100644
index 0000000..38ffe39
Binary files /dev/null and
b/juneau-doc/src/main/javadoc/doc-files/juneau-examples-rest-jetty.Installing.1.png
differ
diff --git
a/juneau-doc/docs/Topics/17.juneau-examples-rest-jetty/doc-files/juneau-microservice-rest-jetty.Installing.2.png
b/juneau-doc/src/main/javadoc/doc-files/juneau-examples-rest-jetty.Installing.2.png
similarity index 100%
rename from
juneau-doc/docs/Topics/17.juneau-examples-rest-jetty/doc-files/juneau-microservice-rest-jetty.Installing.2.png
rename to
juneau-doc/src/main/javadoc/doc-files/juneau-examples-rest-jetty.Installing.2.png
diff --git
a/juneau-doc/src/main/javadoc/doc-files/juneau-examples-rest-jetty.Running.1.png
b/juneau-doc/src/main/javadoc/doc-files/juneau-examples-rest-jetty.Running.1.png
new file mode 100644
index 0000000..3eff3a5
Binary files /dev/null and
b/juneau-doc/src/main/javadoc/doc-files/juneau-examples-rest-jetty.Running.1.png
differ
diff --git
a/juneau-doc/src/main/javadoc/doc-files/juneau-examples-rest-springboot.Classes.png
b/juneau-doc/src/main/javadoc/doc-files/juneau-examples-rest-springboot.Classes.png
deleted file mode 100644
index 9310ea9..0000000
Binary files
a/juneau-doc/src/main/javadoc/doc-files/juneau-examples-rest-springboot.Classes.png
and /dev/null differ
diff --git
a/juneau-doc/src/main/javadoc/doc-files/juneau-examples-rest-springboot.Installing.1.png
b/juneau-doc/src/main/javadoc/doc-files/juneau-examples-rest-springboot.Installing.1.png
new file mode 100644
index 0000000..045030b
Binary files /dev/null and
b/juneau-doc/src/main/javadoc/doc-files/juneau-examples-rest-springboot.Installing.1.png
differ
diff --git
a/juneau-doc/docs/Topics/18.juneau-examples-rest-springboot/doc-files/juneau-examples-rest-springboot-Installing.2.png
b/juneau-doc/src/main/javadoc/doc-files/juneau-examples-rest-springboot.Installing.2.png
similarity index 100%
rename from
juneau-doc/docs/Topics/18.juneau-examples-rest-springboot/doc-files/juneau-examples-rest-springboot-Installing.2.png
rename to
juneau-doc/src/main/javadoc/doc-files/juneau-examples-rest-springboot.Installing.2.png
diff --git
a/juneau-doc/src/main/javadoc/doc-files/juneau-examples-rest-springboot.Running.1.png
b/juneau-doc/src/main/javadoc/doc-files/juneau-examples-rest-springboot.Running.1.png
new file mode 100644
index 0000000..3eff3a5
Binary files /dev/null and
b/juneau-doc/src/main/javadoc/doc-files/juneau-examples-rest-springboot.Running.1.png
differ
diff --git
a/juneau-doc/src/main/javadoc/doc-files/juneau-microservice-jetty-template.Installing.1.png
b/juneau-doc/src/main/javadoc/doc-files/juneau-microservice-jetty-template.Installing.1.png
deleted file mode 100755
index 4ea5cec..0000000
Binary files
a/juneau-doc/src/main/javadoc/doc-files/juneau-microservice-jetty-template.Installing.1.png
and /dev/null differ
diff --git
a/juneau-doc/src/main/javadoc/doc-files/juneau-microservice-jetty-template.Installing.2.png
b/juneau-doc/src/main/javadoc/doc-files/juneau-microservice-jetty-template.Installing.2.png
deleted file mode 100644
index 6e81fa5..0000000
Binary files
a/juneau-doc/src/main/javadoc/doc-files/juneau-microservice-jetty-template.Installing.2.png
and /dev/null differ
diff --git
a/juneau-doc/src/main/javadoc/doc-files/juneau-microservice-springboot-template.Installing.1.png
b/juneau-doc/src/main/javadoc/doc-files/juneau-microservice-springboot-template.Installing.1.png
deleted file mode 100755
index 4ea5cec..0000000
Binary files
a/juneau-doc/src/main/javadoc/doc-files/juneau-microservice-springboot-template.Installing.1.png
and /dev/null differ
diff --git
a/juneau-doc/src/main/javadoc/doc-files/juneau-microservice-springboot-template.Installing.2.png
b/juneau-doc/src/main/javadoc/doc-files/juneau-microservice-springboot-template.Installing.2.png
deleted file mode 100644
index c3a681a..0000000
Binary files
a/juneau-doc/src/main/javadoc/doc-files/juneau-microservice-springboot-template.Installing.2.png
and /dev/null differ
diff --git
a/juneau-doc/src/main/javadoc/doc-files/my-jetty-microservice.Installing.1.png
b/juneau-doc/src/main/javadoc/doc-files/my-jetty-microservice.Installing.1.png
new file mode 100644
index 0000000..3062126
Binary files /dev/null and
b/juneau-doc/src/main/javadoc/doc-files/my-jetty-microservice.Installing.1.png
differ
diff --git
a/juneau-doc/docs/Topics/13.juneau-my-jetty-microservice/doc-files/juneau-microservice-jetty-template.Installing.2.png
b/juneau-doc/src/main/javadoc/doc-files/my-jetty-microservice.Installing.2.png
similarity index 100%
rename from
juneau-doc/docs/Topics/13.juneau-my-jetty-microservice/doc-files/juneau-microservice-jetty-template.Installing.2.png
rename to
juneau-doc/src/main/javadoc/doc-files/my-jetty-microservice.Installing.2.png
diff --git
a/juneau-doc/docs/Topics/14.juneau-my-springboot-microservice/doc-files/juneau-microservice-springboot-template.Running.1.png
b/juneau-doc/src/main/javadoc/doc-files/my-jetty-microservice.Running.1.png
similarity index 100%
rename from
juneau-doc/docs/Topics/14.juneau-my-springboot-microservice/doc-files/juneau-microservice-springboot-template.Running.1.png
rename to
juneau-doc/src/main/javadoc/doc-files/my-jetty-microservice.Running.1.png
diff --git
a/juneau-doc/src/main/javadoc/doc-files/my-springboot-microservice.Installing.1.png
b/juneau-doc/src/main/javadoc/doc-files/my-springboot-microservice.Installing.1.png
new file mode 100644
index 0000000..9611f85
Binary files /dev/null and
b/juneau-doc/src/main/javadoc/doc-files/my-springboot-microservice.Installing.1.png
differ
diff --git
a/juneau-doc/docs/Topics/14.juneau-my-springboot-microservice/doc-files/juneau-microservice-springboot-template.Installing.2.png
b/juneau-doc/src/main/javadoc/doc-files/my-springboot-microservice.Installing.2.png
similarity index 100%
rename from
juneau-doc/docs/Topics/14.juneau-my-springboot-microservice/doc-files/juneau-microservice-springboot-template.Installing.2.png
rename to
juneau-doc/src/main/javadoc/doc-files/my-springboot-microservice.Installing.2.png
diff --git
a/juneau-doc/docs/Topics/13.juneau-my-jetty-microservice/doc-files/juneau-microservice-jetty-template.Running.1.png
b/juneau-doc/src/main/javadoc/doc-files/my-springboot-microservice.Running.1.png
similarity index 100%
rename from
juneau-doc/docs/Topics/13.juneau-my-jetty-microservice/doc-files/juneau-microservice-jetty-template.Running.1.png
rename to
juneau-doc/src/main/javadoc/doc-files/my-springboot-microservice.Running.1.png
diff --git a/juneau-doc/src/main/javadoc/overview.html
b/juneau-doc/src/main/javadoc/overview.html
index 3e30164..27bc9d5 100644
--- a/juneau-doc/src/main/javadoc/overview.html
+++ b/juneau-doc/src/main/javadoc/overview.html
@@ -417,20 +417,21 @@
<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='new'><a class='doclink'
href='#juneau-my-jetty-microservice'>juneau-my-jetty-microservice /
my-jetty-microservice</a></p>
+ <li><p class='new'><a class='doclink'
href='#my-jetty-microservice'>my-jetty-microservice</a></p>
<ol>
- <li><p class='updated'><a class='doclink'
href='#juneau-my-jetty-microservice.Installing'>Installing in Eclipse</a></p>
- <li><p class='updated'><a class='doclink'
href='#juneau-my-jetty-microservice.Running'>Running in Eclipse</a></p>
- <li><p class='updated'><a class='doclink'
href='#juneau-my-jetty-microservice.Building'>Building and Running from
Command-Line</a></p>
+ <li><p class='updated'><a class='doclink'
href='#my-jetty-microservice.Installing'>Installing in Eclipse</a></p>
+ <li><p class='updated'><a class='doclink'
href='#my-jetty-microservice.Running'>Running in Eclipse</a></p>
+ <li><p class='updated'><a class='doclink'
href='#my-jetty-microservice.Building'>Building and Running from
Command-Line</a></p>
</ol>
- <li><p class='new'><a class='doclink'
href='#juneau-my-springboot-microservice'>juneau-my-springboot-microservice /
my-springboot-microservice</a></p>
+ <li><p class='new'><a class='doclink'
href='#my-springboot-microservice'>my-springboot-microservice</a></p>
<ol>
- <li><p class='new'><a class='doclink'
href='#juneau-my-springboot-microservice.Installing'>Installing in
Eclipse</a></p>
- <li><p class='new'><a class='doclink'
href='#juneau-my-springboot-microservice.Running'>Running in Eclipse</a></p>
- <li><p class='new'><a class='doclink'
href='#juneau-my-springboot-microservice.Building'>Building and Running from
Command-Line</a></p>
+ <li><p class='new'><a class='doclink'
href='#my-springboot-microservice.Installing'>Installing in Eclipse</a></p>
+ <li><p class='new'><a class='doclink'
href='#my-springboot-microservice.Running'>Running in Eclipse</a></p>
+ <li><p class='new'><a class='doclink'
href='#my-springboot-microservice.Building'>Building and Running from
Command-Line</a></p>
</ol>
- <li><p class='toc2'><a class='doclink'
href='#juneau-examples-core'>juneau-examples-core</a></p>
+ <li><p class='updated'><a class='doclink'
href='#juneau-examples-core'>juneau-examples-core</a></p>
<ol>
+ <li><p class='new'><a class='doclink'
href='#juneau-examples-core.Installing'>Installing in Eclipse</a></p>
<li><p class='new'><a class='doclink'
href='#juneau-examples-core.Examples'>Examples</a></p>
</ol>
<li><p class='updated'><a class='doclink'
href='#juneau-examples-rest'>juneau-examples-rest</a></p>
@@ -442,14 +443,17 @@
<li><p class=''><a class='doclink'
href='#juneau-examples-rest.ConfigResource'>ConfigResource</a></p>
<li><p class=''><a class='doclink'
href='#juneau-examples-rest.LogsResource'>LogsResource</a></p>
</ol>
- <li><p class='todo'><a class='doclink'
href='#juneau-examples-rest-jetty'>juneau-examples-rest-jetty</a></p>
+ <li><p class='new'><a class='doclink'
href='#juneau-examples-rest-jetty'>juneau-examples-rest-jetty</a></p>
<ol>
- <li><p class='todo'><a class='doclink'
href='#juneau-examples-rest-jetty.Classes'>Classes</a></p>
- <li><p class='todo'><a class='doclink'
href='#juneau-examples-rest-jetty.DeployingToHeroku'>Deploying to Heroku</a></p>
+ <li><p class='new'><a class='doclink'
href='#juneau-examples-rest-jetty.Installing'>Installing in Eclipse</a></p>
+ <li><p class='new'><a class='doclink'
href='#juneau-examples-rest-jetty.Running'>Running in Eclipse</a></p>
+ <li><p class='new'><a class='doclink'
href='#juneau-examples-rest-jetty.Building'>Building and Running from
Command-Line</a></p>
</ol>
- <li><p class='todo'><a class='doclink'
href='#juneau-examples-rest-springboot'>juneau-examples-rest-springboot</a></p>
+ <li><p class='new'><a class='doclink'
href='#juneau-examples-rest-springboot'>juneau-examples-rest-springboot</a></p>
<ol>
- <li><p class='todo'><a class='doclink'
href='#juneau-examples-rest-springboot.Classes'>Classes</a></p>
+ <li><p class='new'><a class='doclink'
href='#juneau-examples-rest-springboot.Installing'>Installing in Eclipse</a></p>
+ <li><p class='new'><a class='doclink'
href='#juneau-examples-rest-springboot.Running'>Running in Eclipse</a></p>
+ <li><p class='new'><a class='doclink'
href='#juneau-examples-rest-springboot.Building'>Building and Running from
Command-Line</a></p>
<li><p class='todo'><a class='doclink'
href='#juneau-examples-rest-springboot.DeployingToHeroku'>Deploying to
Heroku</a></p>
</ol>
<li><p class='toc2'><a class='doclink' href='#Security'>Security
Best-Practices</a></p>
@@ -25103,8 +25107,8 @@
<!--
====================================================================================================
-->
-<h2 class='topic new' onclick='toggle(this)'><a
href='#juneau-my-jetty-microservice' id='juneau-my-jetty-microservice'>13 -
juneau-my-jetty-microservice / my-jetty-microservice</a></h2>
-<div class='topic'><!-- START: 13 - juneau-my-jetty-microservice -->
+<h2 class='topic new' onclick='toggle(this)'><a href='#my-jetty-microservice'
id='my-jetty-microservice'>13 - my-jetty-microservice</a></h2>
+<div class='topic'><!-- START: 13 - my-jetty-microservice -->
<h5 class='figure'>Starter Project Zip</h5>
<p class='bpcode w500'>
my-jetty-microservice-{@property juneauVersion}.zip
@@ -25112,20 +25116,16 @@
<p>
The <l>my-jetty-microservice.zip</l> file is a predefined starter
Eclipse project for developing
- REST microservices using the {@doc juneau-microservice-jetty} package.
+ REST microservices using the {@doc juneau-microservice-jetty
juneau-microservice-jetty} package.
</p>
<p>
It includes a combination of the Juneau Core, Server, and Client APIs
and all libraries needed to execute in a Java 1.8+ environment.
</p>
-<p>
- One significant difference is that we are not using the Juneau {@link
org.apache.juneau.microservice.Microservice} API for our
- application but instead using the existing Spring Boot API.
-</p>
<!--
====================================================================================================
-->
-<h3 class='topic updated' onclick='toggle(this)'><a
href='#juneau-my-jetty-microservice.Installing'
id='juneau-my-jetty-microservice.Installing'>13.1 - Installing in
Eclipse</a></h3>
-<div class='topic'><!-- START: 13.1 - juneau-my-jetty-microservice.Installing
-->
+<h3 class='topic updated' onclick='toggle(this)'><a
href='#my-jetty-microservice.Installing'
id='my-jetty-microservice.Installing'>13.1 - Installing in Eclipse</a></h3>
+<div class='topic'><!-- START: 13.1 - my-jetty-microservice.Installing -->
<p>
Follow these instructions to create a new template project in Eclipse.
</p>
@@ -25136,11 +25136,11 @@
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-my-jetty-microservice.Installing.1.png'
style='width:549px'>
+ <img class='bordered'
src='doc-files/my-jetty-microservice.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-my-jetty-microservice.Installing.2.png'
style='width:400px'>
+ <img class='bordered'
src='doc-files/my-jetty-microservice.Installing.2.png' style='width:400px'>
</ol>
<p>
The important elements in this project are:
@@ -25194,7 +25194,7 @@
}
</p>
<li>
- <l>my-microservice.cfg</l> - The external configuration file.
+ <l>my-jetty-microservice.cfg</l> - The external configuration
file.
<br>Contains various useful settings.
<br>Can be used for your own resource configurations.
<br><br>
@@ -25229,17 +25229,26 @@
#=======================================================================================================================</cc>
<cs>[REST]</cs>
- <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>
+ <cc># Comma-delimited list of key-value pairs that represent locations
of static files that can be served up by your @RestResource-annotated
+ # classes. These are static files that are served up by the servlet
under the specified sub-paths.
+ # For example, given the following setting...
+ # staticFiles = htdocs:my-docs,styles/my-styles
+ # ...the URI "/servletPath/htdocs/javadoc.css" resolves to the path
"/my-docs/javadoc.css".
+ # This path can be relative to the working directory, classpath root,
or package of your resource class.
+ # Used by the BasicRestConfig interface that defines the following
value:
+ # staticFiles="$C{REST/staticFiles}"</cc>
+ <ck>staticFiles</ck> = htdocs:htdocs
+
+ <cc># Stylesheet to use for HTML views.
+ # Used by the BasicRestConfig interface that defines the following
value:
+ #
stylesheet="$C{REST/theme,servlet:/htdocs/themes/devops.css}"</cc>
<ck>theme</ck> = <cv>servlet:/htdocs/themes/devops.css</cv>
+ <cc># Various look-and-feel settings used in the BasicRestConfig
interface.</cc>
<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}}'>
@@ -25265,7 +25274,8 @@
<ck>commands</ck> =
<cv>org.apache.juneau.microservice.console.ExitCommand,
org.apache.juneau.microservice.console.RestartCommand,
- org.apache.juneau.microservice.console.HelpCommand</cv>
+ org.apache.juneau.microservice.console.HelpCommand,
+ org.apache.juneau.microservice.console.ConfigCommand</cv>
<cc>#=======================================================================================================================
# Logger settings
@@ -25365,22 +25375,22 @@
<p>
At this point, you're ready to start the microservice from your
workspace.
</p>
-</div><!-- END: 13.1 - juneau-my-jetty-microservice.Installing -->
+</div><!-- END: 13.1 - my-jetty-microservice.Installing -->
<!--
====================================================================================================
-->
-<h3 class='topic updated' onclick='toggle(this)'><a
href='#juneau-my-jetty-microservice.Running'
id='juneau-my-jetty-microservice.Running'>13.2 - Running in Eclipse</a></h3>
-<div class='topic'><!-- START: 13.2 - juneau-my-jetty-microservice.Running -->
+<h3 class='topic updated' onclick='toggle(this)'><a
href='#my-jetty-microservice.Running' id='my-jetty-microservice.Running'>13.2 -
Running in Eclipse</a></h3>
+<div class='topic'><!-- START: 13.2 - my-jetty-microservice.Running -->
<p>
- The <l>my-microservice.launch</l> file is already provided to allow you
to quickly start
+ The <l>my-jetty-microservice.launch</l> file is already provided to
allow you to quickly start
your new microservice.
</p>
<p>
- Go to <b>Run -> Run Configurations -> Java Application ->
my-microservice</b> and click <b>Run</b>.
+ Go to <b>Run -> Run Configurations -> Java Application ->
my-jetty-microservice</b> and click <b>Run</b>.
<br>In your console view, you should see the following output:
</p>
<p class='bpcode w800'>
- Running class 'RestMicroservice' using config file
'my-microservice.cfg'.
+ Running class 'JettyMicroservice' using config file
'my-jetty-microservice.cfg'.
Server started on port 10000
List of available commands:
@@ -25397,17 +25407,16 @@
<p class='bpcode w400'>
http://localhost:10000
</p>
-<img class='bordered w400'
src='doc-files/juneau-my-jetty-microservice.Running.1.png'>
+<img class='bordered w400' src='doc-files/my-jetty-microservice.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.
+ You can enter the command <code>exit</code> to shut it down.
</p>
-</div><!-- END: 13.2 - juneau-my-jetty-microservice.Running -->
+</div><!-- END: 13.2 - my-jetty-microservice.Running -->
<!--
====================================================================================================
-->
-<h3 class='topic updated' onclick='toggle(this)'><a
href='#juneau-my-jetty-microservice.Building'
id='juneau-my-jetty-microservice.Building'>13.3 - Building and Running from
Command-Line</a></h3>
-<div class='topic'><!-- START: 13.3 - juneau-my-jetty-microservice.Building -->
+<h3 class='topic updated' onclick='toggle(this)'><a
href='#my-jetty-microservice.Building' id='my-jetty-microservice.Building'>13.3
- Building and Running from Command-Line</a></h3>
+<div class='topic'><!-- START: 13.3 - my-jetty-microservice.Building -->
<p>
The <l>pom.xml</l> file is a basic Maven build script for creating your
microservice
as an executable uber-jar.
@@ -25422,20 +25431,20 @@
Your <code>target</code> directory should now contain the following
files:
</p>
<ul>
- <li><code>my-microservice-1.0.jar</code>
- <li><code>my-microservice.cfg</code>
+ <li><code>my-jetty-microservice-1.0.jar</code>
+ <li><code>my-jetty-microservice.cfg</code>
</ul>
<p>
To start from a command line, run the following command from inside
your <code>target</code> directory:
</p>
<p class='bpcode w800'>
- java -jar my-microservice-1.0.jar
+ java -jar my-jetty-microservice-1.0.jar
</p>
<p>
You should see the following console output:
</p>
<p class='bpcode w800'>
- Running class 'RestMicroservice' using config file
'my-microservice.cfg'.
+ Running class 'JettyMicroservice' using config file
'my-jetty-microservice.cfg'.
Server started on port 10000
List of available commands:
@@ -25449,13 +25458,13 @@
If you get this error message: <code
class='snippet'>java.net.BindException: Address already in use</code>,
then this microservice is already running elsewhere and so it cannot
bind to port 10000.
</p>
-</div><!-- END: 13.3 - juneau-my-jetty-microservice.Building -->
-</div><!-- END: 13 - juneau-my-jetty-microservice -->
+</div><!-- END: 13.3 - my-jetty-microservice.Building -->
+</div><!-- END: 13 - my-jetty-microservice -->
<!--
====================================================================================================
-->
-<h2 class='topic new' onclick='toggle(this)'><a
href='#juneau-my-springboot-microservice'
id='juneau-my-springboot-microservice'>14 - juneau-my-springboot-microservice /
my-springboot-microservice</a></h2>
-<div class='topic'><!-- START: 14 - juneau-my-springboot-microservice -->
+<h2 class='topic new' onclick='toggle(this)'><a
href='#my-springboot-microservice' id='my-springboot-microservice'>14 -
my-springboot-microservice</a></h2>
+<div class='topic'><!-- START: 14 - my-springboot-microservice -->
<h5 class='figure'>Starter Project Zip</h5>
<p class='bpcode w500'>
my-springboot-microservice-{@property juneauVersion}.zip
@@ -25463,16 +25472,20 @@
<p>
The <l>my-springboot-microservice.zip</l> file is a predefined starter
Eclipse project for developing
- REST microservices using the {@doc juneau-rest-server-springboot}
package with Spring Boot.
+ REST microservices using the {@doc juneau-rest-server-springboot
juneau-rest-server-springboot} package with Spring Boot.
</p>
<p>
It includes a combination of the Juneau Core, Server, and Client APIs
and all libraries needed to execute in a Java 1.8+ environment.
</p>
+<p>
+ One significant difference is that we are not using the Juneau {@link
org.apache.juneau.microservice.Microservice} API for our
+ application but instead using the existing Spring Boot API.
+</p>
<!--
====================================================================================================
-->
-<h3 class='topic new' onclick='toggle(this)'><a
href='#juneau-my-springboot-microservice.Installing'
id='juneau-my-springboot-microservice.Installing'>14.1 - Installing in
Eclipse</a></h3>
-<div class='topic'><!-- START: 14.1 -
juneau-my-springboot-microservice.Installing -->
+<h3 class='topic new' onclick='toggle(this)'><a
href='#my-springboot-microservice.Installing'
id='my-springboot-microservice.Installing'>14.1 - Installing in Eclipse</a></h3>
+<div class='topic'><!-- START: 14.1 - my-springboot-microservice.Installing -->
<p>
Follow these instructions to create a new template project in Eclipse.
</p>
@@ -25483,11 +25496,11 @@
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-my-springboot-microservice.Installing.1.png'
style='width:549px'>
+ <img class='bordered'
src='doc-files/my-springboot-microservice.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-my-springboot-microservice.Installing.2.png'
style='width:400px'>
+ <img class='bordered'
src='doc-files/my-springboot-microservice.Installing.2.png' style='width:400px'>
</ol>
<p>
The important elements in this project are:
@@ -25564,17 +25577,26 @@
#=======================================================================================================================</cc>
<cs>[REST]</cs>
- <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>
+ <cc># Comma-delimited list of key-value pairs that represent locations
of static files that can be served up by your @RestResource-annotated
+ # classes. These are static files that are served up by the servlet
under the specified sub-paths.
+ # For example, given the following setting...
+ # staticFiles = htdocs:my-docs,styles/my-styles
+ # ...the URI "/servletPath/htdocs/javadoc.css" resolves to the path
"/my-docs/javadoc.css".
+ # This path can be relative to the working directory, classpath root,
or package of your resource class.
+ # Used by the BasicRestConfig interface that defines the following
value:
+ # staticFiles="$C{REST/staticFiles}"</cc>
+ <ck>staticFiles</ck> = htdocs:htdocs
+
+ <cc># Stylesheet to use for HTML views.
+ # Used by the BasicRestConfig interface that defines the following
value:
+ #
stylesheet="$C{REST/theme,servlet:/htdocs/themes/devops.css}"</cc>
<ck>theme</ck> = <cv>servlet:/htdocs/themes/devops.css</cv>
+ <cc># Various look-and-feel settings used in the BasicRestConfig
interface.</cc>
<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}}'>
@@ -25589,18 +25611,18 @@
<p>
At this point, you're ready to start the microservice from your
workspace.
</p>
-</div><!-- END: 14.1 - juneau-my-springboot-microservice.Installing -->
+</div><!-- END: 14.1 - my-springboot-microservice.Installing -->
<!--
====================================================================================================
-->
-<h3 class='topic new' onclick='toggle(this)'><a
href='#juneau-my-springboot-microservice.Running'
id='juneau-my-springboot-microservice.Running'>14.2 - Running in
Eclipse</a></h3>
-<div class='topic'><!-- START: 14.2 -
juneau-my-springboot-microservice.Running -->
+<h3 class='topic new' onclick='toggle(this)'><a
href='#my-springboot-microservice.Running'
id='my-springboot-microservice.Running'>14.2 - Running in Eclipse</a></h3>
+<div class='topic'><!-- START: 14.2 - my-springboot-microservice.Running -->
<p>
- The <l>my-microservice.launch</l> file is already provided to allow you
to quickly start
+ The <l>my-springboot-microservice.launch</l> file is already provided
to allow you to quickly start
your new microservice.
</p>
<p>
- Go to <b>Run -> Run Configurations -> Java Application ->
my-microservice</b> and click <b>Run</b>.
+ Go to <b>Run -> Run Configurations -> Java Application ->
my-springboot-microservice</b> and click <b>Run</b>.
<br>In your console view, you should see the following output:
</p>
<p class='bpcode w800'>
@@ -25617,22 +25639,19 @@
INFO: Started App in 1.999 seconds (JVM running for 2.999)
</p>
<p>
- Now open your browser and point to <l>http://localhost:8080</l>.
+ Now open your browser and point to <l>http://localhost:5000</l>.
You should see the following:
</p>
<p class='bpcode w400'>
- http://localhost:8080
+ http://localhost:5000
</p>
-<img class='bordered w400'
src='doc-files/juneau-my-springboot-microservice.Running.1.png'>
-<p>
- You have started a REST interface on port 8080.
-</p>
-</div><!-- END: 14.2 - juneau-my-springboot-microservice.Running -->
+<img class='bordered w400'
src='doc-files/my-springboot-microservice.Running.1.png'>
+</div><!-- END: 14.2 - my-springboot-microservice.Running -->
<!--
====================================================================================================
-->
-<h3 class='topic new' onclick='toggle(this)'><a
href='#juneau-my-springboot-microservice.Building'
id='juneau-my-springboot-microservice.Building'>14.3 - Building and Running
from Command-Line</a></h3>
-<div class='topic'><!-- START: 14.3 -
juneau-my-springboot-microservice.Building -->
+<h3 class='topic new' onclick='toggle(this)'><a
href='#my-springboot-microservice.Building'
id='my-springboot-microservice.Building'>14.3 - Building and Running from
Command-Line</a></h3>
+<div class='topic'><!-- START: 14.3 - my-springboot-microservice.Building -->
<p>
The <l>pom.xml</l> file is a basic Maven build script for creating your
microservice
as an executable uber-jar.
@@ -25647,13 +25666,13 @@
Your <code>target</code> directory should now contain the following
files:
</p>
<ul>
- <li><code>my-microservice-1.0.jar</code>
+ <li><code>my-springboot-microservice-1.0.jar</code>
</ul>
<p>
To start from a command line, run the following command from inside
your <code>target</code> directory:
</p>
<p class='bpcode w800'>
- java -jar my-microservice-1.0.jar
+ java -jar my-springboot-microservice-1.0.jar
</p>
<p>
You should see the following console output:
@@ -25671,12 +25690,12 @@
Dec 21, 2012 12:30:00 AM org.springframework.boot.StartupInfoLogger
logStarted
INFO: Started App in 1.999 seconds (JVM running for 2.999)
</p>
-</div><!-- END: 14.3 - juneau-my-springboot-microservice.Building -->
-</div><!-- END: 14 - juneau-my-springboot-microservice -->
+</div><!-- END: 14.3 - my-springboot-microservice.Building -->
+</div><!-- END: 14 - my-springboot-microservice -->
<!--
====================================================================================================
-->
-<h2 class='topic ' onclick='toggle(this)'><a href='#juneau-examples-core'
id='juneau-examples-core'>15 - juneau-examples-core</a></h2>
+<h2 class='topic updated' onclick='toggle(this)'><a
href='#juneau-examples-core' id='juneau-examples-core'>15 -
juneau-examples-core</a></h2>
<div class='topic'><!-- START: 15 - juneau-examples-core -->
<h5 class='figure'>Archive File</h5>
<p class='bpcode w500'>
@@ -25686,12 +25705,14 @@
<p>
The <code>juneau-examples-core</code> project contains various code
examples for using the core APIs.
</p>
-<p>
- The project project can be loaded into your workspace by importing the
- <code>juneau-examples-core-{@property juneauVersion}.zip</code> file.
-</p>
-<h5 class='topic'>juneau-examples-core install instructions</h5>
+<!--
====================================================================================================
-->
+
+<h3 class='topic new' onclick='toggle(this)'><a
href='#juneau-examples-core.Installing'
id='juneau-examples-core.Installing'>15.1 - Installing in Eclipse</a></h3>
+<div class='topic'><!-- START: 15.1 - juneau-examples-core.Installing -->
+<p>
+ Follow these instructions to import the Juneau project into Eclipse.
+</p>
<p>
Download the <code>juneau-examples-core-{@property
juneauVersion}.zip</code> file from the downloads page
(located in the binaries) and import it into your workspace as an
existing project:
@@ -25710,11 +25731,12 @@
The Core library samples are currently a work-in-progress so there's
not much here yet.
This section will be updated as new code is added.
</p>
+</div><!-- END: 15.1 - juneau-examples-core.Installing -->
<!--
====================================================================================================
-->
-<h3 class='topic new' onclick='toggle(this)'><a
href='#juneau-examples-core.Examples' id='juneau-examples-core.Examples'>15.1 -
Examples</a></h3>
-<div class='topic'><!-- START: 15.1 - juneau-examples-core.Examples -->
+<h3 class='topic new' onclick='toggle(this)'><a
href='#juneau-examples-core.Examples' id='juneau-examples-core.Examples'>15.2 -
Examples</a></h3>
+<div class='topic'><!-- START: 15.2 - juneau-examples-core.Examples -->
<p>
The following shows the core examples provided:
</p>
@@ -25742,7 +25764,7 @@
<li class='jc'>{@link
org.apache.juneau.examples.core.html.HtmlComplexExample} - HtmlSerializer usage
on serialize complex Pojo bean.
</ul>
</ul>
-</div><!-- END: 15.1 - juneau-examples-core.Examples -->
+</div><!-- END: 15.2 - juneau-examples-core.Examples -->
</div><!-- END: 15 - juneau-examples-core -->
<!--
====================================================================================================
-->
@@ -27762,7 +27784,7 @@
<!--
====================================================================================================
-->
-<h2 class='topic todo' onclick='toggle(this)'><a
href='#juneau-examples-rest-jetty' id='juneau-examples-rest-jetty'>17 -
juneau-examples-rest-jetty</a></h2>
+<h2 class='topic new' onclick='toggle(this)'><a
href='#juneau-examples-rest-jetty' id='juneau-examples-rest-jetty'>17 -
juneau-examples-rest-jetty</a></h2>
<div class='topic'><!-- START: 17 - juneau-examples-rest-jetty -->
<h5 class='figure'>Starter Project Zip</h5>
<p class='bpcode w500'>
@@ -27774,170 +27796,621 @@
microservice in an Eclipse workspace and build it as an executable jar.
</p>
-<h5 class='topic'>juneau-examples-rest install instructions</h5>
-<p>
- Download the <code>juneau-examples-rest-{@property
juneauVersion}.zip</code> file from the downloads page
- (located in the binaries) and import it into your workspace as an
existing project:
-</p>
-<img class='bordered' src='doc-files/juneau-examples-rest.1.png'
style='width:524px'>
-<p>
- Select the archive file and import the project:
-</p>
-<img class='bordered' src='doc-files/juneau-examples-rest.2.png'
style='width:523px'>
-<p>
- Once loaded, you should see the following project structure:
-</p>
-<img class='bordered' src='doc-files/juneau-examples-rest.3.png'
style='width:325px'>
-<p>
- The microservice can be started from the
<code>juneau-examples-rest.launch</code> file.
- It will start up the microservice on port 10000 which you can then view
through a browser:
-</p>
-<p class='bpcode w400'>
- http://localhost:10000
-</p>
-<img class='bordered w400' src='doc-files/juneau-examples-rest.4.png'>
-
<!--
====================================================================================================
-->
-<h3 class='topic todo' onclick='toggle(this)'><a
href='#juneau-examples-rest-jetty.Classes'
id='juneau-examples-rest-jetty.Classes'>17.1 - Classes</a></h3>
-<div class='topic'><!-- START: 17.1 - juneau-examples-rest-jetty.Classes -->
+<h3 class='topic new' onclick='toggle(this)'><a
href='#juneau-examples-rest-jetty.Installing'
id='juneau-examples-rest-jetty.Installing'>17.1 - Installing in Eclipse</a></h3>
+<div class='topic'><!-- START: 17.1 - juneau-examples-rest-jetty.Installing -->
<p>
- The <code>juneau-examples-rest-springboot</code> project contains the
same classes as found in <code>juneau-examples-rest</code>
- with the inclusion of a
<code>org.apache.juneau.examples.rest.springboot</code> package containing the
following:
-</p>
-<img class='bordered w800'
src='doc-files/juneau-examples-rest-springboot.Classes.png'>
+ Follow these instructions to import the REST examples project using
Jetty into Eclipse.
+</p>
+<ol class='spaced-list'>
+ <li>
+ Download the latest <l>juneau-examples-rest-jetty.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-examples-rest-jetty.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-examples-rest-jetty.Installing.2.png' style='width:400px'>
+</ol>
<p>
- The <code>App</code> class is used to invoke our application using
Spring:
+ The important elements in this project are:
</p>
-<p class='bpcode w800'>
- <ja>@SpringBootApplication</ja>
- <ja>@Controller</ja>
- <ja>@Import</ja>({AppConfiguration.<jk>class</jk>,
AppServletConfiguration.<jk>class</jk>})
+<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>private static volatile</jk> ConfigurableApplicationContext
<jsf>context</jsf>;
-
- <jk>public static void</jk> main(String[] args) {
- <jk>try</jk> {
-
<jsm>setProperty</jsm>(<js>"juneau.configFile"</js>, <js>"examples.cfg"</js>,
<jk>false</jk>);
- <jsf>context</jsf> =
SpringApplication.<jsm>run</jsm>(App.<jk>class</jk>, args);
- <jk>if</jk> (<jsf>context</jsf> ==
<jk>null</jk>)
- System.<jsm>exit</jsm>(2); <jc>//
Probably port in use?</jc>
-
AppConfiguration.<jsm>setAppContext</jsm>(context);
-
<jsm>setProperty</jsm>(<js>"juneau.serverPort"</js>,
<jsf>context</jsf>.getEnvironment().getProperty(<js>"server.port"</js>),
<jk>false</jk>);
- } <jk>catch</jk> (Exception e) {
- e.printStackTrace();
- }
- }
-
- <jk>public static void</jk> start() {
- <jsm>main</jsm>(<jk>new</jk> String[0]);
- }
-
- <jk>public static void</jk> stop() {
- <jsf>context</jsf>.stop();
+ <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>
-</div><!-- END: 17.1 - juneau-examples-rest-jetty.Classes -->
-
-<!--
====================================================================================================
-->
-
-<h3 class='topic todo' onclick='toggle(this)'><a
href='#juneau-examples-rest-jetty.DeployingToHeroku'
id='juneau-examples-rest-jetty.DeployingToHeroku'>17.2 - Deploying to
Heroku</a></h3>
-<div class='topic'><!-- START: 17.2 -
juneau-examples-rest-jetty.DeployingToHeroku -->
-<p>
- TODO
-</p>
-</div><!-- END: 17.2 - juneau-examples-rest-jetty.DeployingToHeroku -->
-</div><!-- END: 17 - juneau-examples-rest-jetty -->
-
-<!--
====================================================================================================
-->
-
-<h2 class='topic todo' onclick='toggle(this)'><a
href='#juneau-examples-rest-springboot' id='juneau-examples-rest-springboot'>18
- juneau-examples-rest-springboot</a></h2>
-<div class='topic'><!-- START: 18 - juneau-examples-rest-springboot -->
-<h5 class='figure'>Starter Project Zip</h5>
-<p class='bpcode w500'>
- juneau-examples-rest-springboot-{@property juneauVersion}.zip
-</p>
-
-<p>
- The <code>juneau-examples-rest-springboot</code> class contains the
same examples as <code>juneau-examples-rest</code>
- but also includes the following:
-</p>
-<ul class='spaced-list'>
- <li>
- A starter class for invoking the examples using Spring Boot.
- <li>
- A resource resolver for resolving REST resources as injectable
beans.
+ </p>
<li>
- A POM that extends from <code>spring-boot-starter-parent</code>
that allows you to build a fully-shaded executable jar.
+ <l>RootResources.java</l> - The top-level REST resource.
+ <br>This class routes HTTP requests to child resources:
+ <br><br>
+ <p class='bcode w800'>
+ <ja>@RestResource</ja>(
+ path=<js>"/*"</js>,
+ title=<js>"Root resources"</js>,
+ description=<js>"Example of a router resource page."</js>,
+ htmldoc=<ja>@HtmlDoc</ja>(
+ widgets={
+ ContentTypeMenuItem.<jk>class</jk>,
+ ThemeMenuItem.<jk>class</jk>
+ },
+ navlinks={
+ <js>"options: ?method=OPTIONS"</js>,
+ <js>"$W{ContentTypeMenuItem}"</js>,
+ <js>"$W{ThemeMenuItem}"</js>,
+ <js>"source:
$C{Source/gitHub}/org/apache/juneau/examples/rest/$R{servletClassSimple}.java"</js>
+ },
+ aside={
+ <js>"<div style='max-width:400px'
class='text'>"</js>,
+ <js>" <p>This is an example of a
'router' page that serves as a jumping-off point to child
resources.</p>"</js>,
+ <js>" <p>Resources can be nested
arbitrarily deep through router pages.</p>"</js>,
+ <js>" <p>Note the <span
class='link'>options</span> link provided that lets you see the
generated swagger doc for this page.</p>"</js>,
+ <js>" <p>Also note the <span
class='link'>sources</span> link on these pages to view the source
code for the page.</p>"</js>,
+ <js>" <p>All content on pages in the UI
are serialized POJOs. In this case, it's a serialized array of beans with 2
properties, 'name' and 'description'.</p>"</js>,
+ <js>" <p>Other features (such as this
aside) are added through annotations.</p>"</js>,
+ <js>"</div>"</js>
+ }
+ ),
+ properties={
+ <jc>// For testing purposes, we want to use single
quotes in all the serializers so it's easier to do simple
+ // String comparisons.
+ // You can apply any of the
Serializer/Parser/BeanContext settings this way.</jc>
+
<ja>@Property</ja>(name=<jsf>WSERIALIZER_quoteChar</jsf>, value=<js>"'"</js>)
+ },
+ children={
+ HelloWorldResource.<jk>class</jk>,
+ PetStoreResource.<jk>class</jk>,
+ DtoExamples.<jk>class</jk>,
+ ConfigResource.<jk>class</jk>,
+ LogsResource.<jk>class</jk>,
+ ShutdownResource.<jk>class</jk>
+ }
+ )
+ <jk>public class</jk> RootResources <jk>extends</jk>
BasicRestServletJenaGroup {
+ <jc>// No code</jc>
+ }
+ </p>
<li>
- Configuration files for deploying the microservice to Heroku.
-</ul>
-
-<p>
- The microservice app can be imported into Eclipse just like
<code>juneau-examples-rest</code>.
-</p>
-<p>
- The microservice can be started from the
<code>juneau-examples-rest-springboot.launch</code> file.
- It will start up the microservice on port 5000 which you can then view
through a browser.
-</p>
-<p>
- The Spring Boot examples app has identical functionality to the normal
examples app except for console command support.
-</p>
-
-<!--
====================================================================================================
-->
+ <l>juneau-examples-rest-jetty.cfg</l> - The external
configuration file.
+ <br>Contains various useful settings.
+ <br>Can be used for your own resource configurations.
+ <br><br>
+ <p class='bcode w800'>
+
<cc>#=======================================================================================================================
+ # Basic configuration file for REST microservices
+ # Subprojects can use this as a starting point.
+
#=======================================================================================================================</cc>
+
+
<cc>#=======================================================================================================================
+ # Jetty settings
+
#=======================================================================================================================</cc>
+ <cs>[Jetty]</cs>
+
+ <cc># Path of the jetty.xml file used to configure the Jetty
server.</cc>
+ <ck>config</ck> = <cv>jetty.xml</cv>
+
+ <cc># Resolve Juneau variables in the jetty.xml file.</cc>
+ <ck>resolveVars</ck> = <cv>true</cv>
+
+ <cc># Port to use for the jetty server.
+ # You can specify multiple ports. The first available will be used.
'0' indicates to try a random port.
+ # The resulting available port gets set as the system property
"availablePort" which can be referenced in the
+ # 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>
-<h3 class='topic todo' onclick='toggle(this)'><a
href='#juneau-examples-rest-springboot.Classes'
id='juneau-examples-rest-springboot.Classes'>18.1 - Classes</a></h3>
-<div class='topic'><!-- START: 18.1 - juneau-examples-rest-springboot.Classes
-->
-<p>
- The <code>juneau-examples-rest-springboot</code> project contains the
same classes as found in <code>juneau-examples-rest</code>
- with the inclusion of a
<code>org.apache.juneau.examples.rest.springboot</code> package containing the
following:
-</p>
-<img class='bordered w800'
src='doc-files/juneau-examples-rest-springboot.Classes.png'>
-<p>
- The <code>App</code> class is used to invoke our application using
Spring:
-</p>
-<p class='bpcode w800'>
- <ja>@SpringBootApplication</ja>
- <ja>@Controller</ja>
- <ja>@Import</ja>({AppConfiguration.<jk>class</jk>,
AppServletConfiguration.<jk>class</jk>})
- <jk>public class</jk> App {
+
<cc>#=======================================================================================================================
+ # REST settings
+
#=======================================================================================================================</cc>
+ <cs>[REST]</cs>
- <jk>private static volatile</jk> ConfigurableApplicationContext
<jsf>context</jsf>;
+ <cc># Comma-delimited list of key-value pairs that represent locations
of static files that can be served up by your @RestResource-annotated
+ # classes. These are static files that are served up by the servlet
under the specified sub-paths.
+ # For example, given the following setting...
+ # staticFiles = htdocs:my-docs,styles/my-styles
+ # ...the URI "/servletPath/htdocs/javadoc.css" resolves to the path
"/my-docs/javadoc.css".
+ # This path can be relative to the working directory, classpath root,
or package of your resource class.
+ # Used by the BasicRestConfig interface that defines the following
value:
+ # staticFiles="$C{REST/staticFiles}"</cc>
+ <ck>staticFiles</ck> = htdocs:htdocs
+
+ <cc># Stylesheet to use for HTML views.
+ # Used by the BasicRestConfig interface that defines the following
value:
+ #
stylesheet="$C{REST/theme,servlet:/htdocs/themes/devops.css}"</cc>
+ <ck>theme</ck> = <cv>servlet:/htdocs/themes/devops.css</cv>
- <jk>public static void</jk> main(String[] args) {
- <jk>try</jk> {
-
<jsm>setProperty</jsm>(<js>"juneau.configFile"</js>, <js>"examples.cfg"</js>,
<jk>false</jk>);
- <jsf>context</jsf> =
SpringApplication.<jsm>run</jsm>(App.<jk>class</jk>, args);
- <jk>if</jk> (<jsf>context</jsf> ==
<jk>null</jk>)
- System.<jsm>exit</jsm>(2); <jc>//
Probably port in use?</jc>
-
AppConfiguration.<jsm>setAppContext</jsm>(context);
-
<jsm>setProperty</jsm>(<js>"juneau.serverPort"</js>,
<jsf>context</jsf>.getEnvironment().getProperty(<js>"server.port"</js>),
<jk>false</jk>);
- } <jk>catch</jk> (Exception e) {
- e.printStackTrace();
- }
- }
+ <cc># Various look-and-feel settings used in the BasicRestConfig
interface.</cc>
+ <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>
- <jk>public static void</jk> start() {
- <jsm>main</jsm>(<jk>new</jk> String[0]);
- }
+
<cc>#=======================================================================================================================
+ # Console settings
+
#=======================================================================================================================</cc>
+ <cs>[Console]</cs>
- <jk>public static void</jk> stop() {
- <jsf>context</jsf>.stop();
- }
- }
+ <ck>enabled</ck> = <cv>true</cv>
+
+ <cc># List of available console commands.
+ # These are classes that implements ConsoleCommand that allow you to
submit commands to the microservice via
+ # the console.
+ # When listed here, the implementations must provide a no-arg
constructor.
+ # They can also be provided dynamically by overriding the
Microservice.createConsoleCommands() method.</cc>
+ <ck>commands</ck> =
+ <cv>org.apache.juneau.microservice.console.ExitCommand,
+ org.apache.juneau.microservice.console.RestartCommand,
+ org.apache.juneau.microservice.console.HelpCommand,
+ org.apache.juneau.microservice.console.ConfigCommand</cv>
+
+
<cc>#=======================================================================================================================
+ # Logger settings
+
#-----------------------------------------------------------------------------------------------------------------------
+ # See FileHandler Java class for details.
+
#=======================================================================================================================</cc>
+ <cs>[Logging]</cs>
+
+ ...
+
+
<cc>#=======================================================================================================================
+ # System properties
+
#-----------------------------------------------------------------------------------------------------------------------
+ # These are arbitrary system properties that are set during startup.
+
#=======================================================================================================================</cc>
+ <cs>[SystemProperties]</cs>
+
+ <cc># Configure Jetty for StdErrLog Logging
+ # org.eclipse.jetty.util.log.class =
org.eclipse.jetty.util.log.StrErrLog</cc>
+
+ <cc># Configure Jetty to log using java-util logging</cc>
+ <ck>org.eclipse.jetty.util.log.class</ck> =
<cv>org.apache.juneau.microservice.jetty.JettyLogger</cv>
+
+ <cc># Jetty logging level
+ # Possible values: ALL, DEBUG, INFO, WARN, OFF</cc>
+ <ck>org.eclipse.jetty.LEVEL</ck> = <cv>WARN
+
+ <ck>derby.stream.error.file</ck> =
<cv>$C{Logging/logDir}/derby-errors.log</cv>
+ </p>
+ <li>
+ <l>jetty.xml</l> - The Jetty configuration file.
+ <br>A bare-bones config file that can be extended to use any
Jetty features.
+ <br><br>
+ <p class='bcode w800'>
+ <xt><Configure</xt> <xa>id</xa>=<xs>"ExampleServer"</xs>
<xa>class</xa>=<xs>"org.eclipse.jetty.server.Server"</xs>></xt>
+
+ <xt><Set</xt>
<xa>name</xa>=<xs>"connectors"</xs><xt>></xt>
+ <xt><Array</xt>
<xa>type</xa>=<xs>"org.eclipse.jetty.server.Connector"</xs><xt>></xt>
+ <xt><Item></xt>
+ <xt><New</xt>
<xa>class</xa>=<xs>"org.eclipse.jetty.server.ServerConnector"</xs><xt>></xt>
+ <xt><Arg></xt>
+ <xt><Ref</xt>
<xa>refid</xa>=<xs>"ExampleServer"</xs><xt>/></xt>
+ <xt></Arg></xt>
+ <xt><Set</xt>
<xa>name</xa>=<xs>"port"</xs><xt>></xt>$S{availablePort,8080}<xt></Set></xt>
+ <xt></New></xt>
+ <xt></Item></xt>
+ <xt></Array></xt>
+ <xt></Set></xt>
+
+ <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>
+ <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>
+ <xt></New></xt>
+
+ <xt><Set</xt> <xa>name</xa>=<xs>"handler"</xs><xt>></xt>
+ <xt><New</xt>
<xa>class</xa>=<xs>"org.eclipse.jetty.server.handler.HandlerCollection"</xs><xt>></xt>
+ <xt><Set</xt>
<xa>name</xa>=<xs>"handlers"</xs><xt>></xt>
+ <xt><Array</xt>
<xa>type</xa>=<xs>"org.eclipse.jetty.server.Handler"</xs><xt>></xt>
+ <xt><Item></xt>
+ <xt><Ref</xt>
<xa>refid</xa>=<xs>"context"</xs><xt>/></xt>
+ <xt></Item></xt>
+ <xt><Item></xt>
+ <xt><New</xt>
<xa>class</xa>=<xs>"org.eclipse.jetty.server.handler.DefaultHandler"</xs><xt>/></xt>
+ <xt></Item></xt>
+ <xt></Array></xt>
+ <xt></Set></xt>
+ <xt></New></xt>
+ <xt></Set></xt>
+
+ <xt><Set</xt>
<xa>name</xa>=<xs>"requestLog"</xs><xt>></xt>
+ <xt><New</xt> <xa>id</xa>=<xs>"RequestLogImpl"</xs>
<xa>class</xa>=<xs>"org.eclipse.jetty.server.NCSARequestLog"</xs><xt>></xt>
+ <xt><Set</xt>
<xa>name</xa>=<xs>"filename"</xs><xt>><Property</xt>
<xa>name</xa>=<xs>"jetty.logs"</xs>
<xa>default</xa>=<xs>"$C{Logging/logDir,logs}"</xs><xt>/></xt>/jetty-requests.log<xt></Set></xt>
+ <xt><Set</xt>
<xa>name</xa>=<xs>"filenameDateFormat</xs><xt>"></xt>yyyy_MM_dd<xt></Set></xt>
+ <xt><Set</xt>
<xa>name</xa>=<xs>"LogTimeZone"</xs><xt>></xt>GMT<xt></Set></xt>
+ <xt><Set</xt>
<xa>name</xa>=<xs>"retainDays"</xs><xt>></xt>90<xt></Set></xt>
+ <xt><Set</xt>
<xa>name</xa>=<xs>"append"</xs><xt>></xt>false<xt></Set></xt>
+ <xt><Set</xt>
<xa>name</xa>=<xs>"LogLatency"</xs><xt>></xt>true<xt></Set></xt>
+ <xt></New></xt>
+ <xt></Set></xt>
+
+ <xt><Get</xt> <xa>name</xa>=<xs>"ThreadPool"</xs><xt>></xt>
+ <xt><Set</xt> <xa>name</xa>=<xs>"minThreads"</xs>
<xa>type</xa>=<xs>"int"</xs><xt>></xt>10<xt></Set></xt>
+ <xt><Set</xt> <xa>name</xa>=<xs>"maxThreads"</xs>
<xa>type</xa>=<xs>"int"</xs><xt>></xt>100<xt></Set></xt>
+ <xt><Set</xt> <xa>name</xa>=<xs>"idleTimeout"</xs>
<xa>type</xa>=<xs>"int"</xs><xt>></xt>60000<xt></Set></xt>
+ <xt><Set</xt>
<xa>name</xa>=<xs>"detailedDump"</xs><xt>></xt>true<xt></Set></xt>
+ <xt></Get></xt>
+ <xt></Configure></xt>
+ </p>
+</ul>
+<p>
+ At this point, you're ready to start the microservice from your
workspace.
+</p>
+</div><!-- END: 17.1 - juneau-examples-rest-jetty.Installing -->
+
+<!--
====================================================================================================
-->
+
+<h3 class='topic new' onclick='toggle(this)'><a
href='#juneau-examples-rest-jetty.Running'
id='juneau-examples-rest-jetty.Running'>17.2 - Running in Eclipse</a></h3>
+<div class='topic'><!-- START: 17.2 - juneau-examples-rest-jetty.Running -->
+<p>
+ The <l>juneau-examples-rest-jetty.launch</l> file is already provided
to allow you to quickly start
+ your new microservice.
+</p>
+<p>
+ Go to <b>Run -> Run Configurations -> Java Application ->
juneau-examples-rest-jetty</b> and click <b>Run</b>.
+ <br>In your console view, you should see the following output:
+</p>
+<p class='bpcode w800'>
+ Running class 'JettyMicroservice' using config file
'juneau-examples-rest-jetty.cfg'.
+ Server started on port 10000
+
+ List of available commands:
+ exit -- Shut down service
+ restart -- Restarts service
+ help -- Commands help
+
+ >
+</p>
+<p>
+ Now open your browser and point to <l>http://localhost:10000</l>.
+ You should see the following:
+</p>
+<p class='bpcode w400'>
+ http://localhost:10000
+</p>
+<img class='bordered w400'
src='doc-files/juneau-examples-rest-jetty.Running.1.png'>
+<p>
+ You can enter the command <code>exit</code> to shut it down.
+</p>
+</div><!-- END: 17.2 - juneau-examples-rest-jetty.Running -->
+
+<!--
====================================================================================================
-->
+
+<h3 class='topic new' onclick='toggle(this)'><a
href='#juneau-examples-rest-jetty.Building'
id='juneau-examples-rest-jetty.Building'>17.3 - Building and Running from
Command-Line</a></h3>
+<div class='topic'><!-- START: 17.3 - juneau-examples-rest-jetty.Building -->
+<p>
+ The <l>pom.xml</l> file is a basic Maven build script for creating the
examples microservice
+ as an executable uber-jar.
+</p>
+<p>
+ The easiest way to build the microservice is to run the following from
the project root.
+</p>
+<p class='bpcode w800'>
+ mvn clean install
+</p>
+<p>
+ Your <code>target</code> directory should now contain the following
files:
+</p>
+<ul>
+ <li><code>juneau-examples-rest-jetty-1.0.jar</code>
+ <li><code>juneau-examples-rest-jetty.cfg</code>
+</ul>
+<p>
+ To start from a command line, run the following command from inside
your <code>target</code> directory:
+</p>
+<p class='bpcode w800'>
+ java -jar juneau-examples-rest-jetty-1.0.jar
+</p>
+<p>
+ You should see the following console output:
+</p>
+<p class='bpcode w800'>
+ Running class 'JettyMicroservice' using config file
'juneau-examples-rest-jetty.cfg'.
+ Server started on port 10000
+
+ List of available commands:
+ exit -- Shut down service
+ restart -- Restarts service
+ help -- Commands help
+
+ >
+</p>
+<p>
+ If you get this error message: <code
class='snippet'>java.net.BindException: Address already in use</code>,
+ then this microservice is already running elsewhere and so it cannot
bind to port 10000.
+</p>
+</div><!-- END: 17.3 - juneau-examples-rest-jetty.Building -->
+</div><!-- END: 17 - juneau-examples-rest-jetty -->
+
+<!--
====================================================================================================
-->
+
+<h2 class='topic new' onclick='toggle(this)'><a
href='#juneau-examples-rest-springboot' id='juneau-examples-rest-springboot'>18
- juneau-examples-rest-springboot</a></h2>
+<div class='topic'><!-- START: 18 - juneau-examples-rest-springboot -->
+<h5 class='figure'>Starter Project Zip</h5>
+<p class='bpcode w500'>
+ juneau-examples-rest-springboot-{@property juneauVersion}.zip
+</p>
+
+<p>
+ The <code>juneau-examples-rest-springboot</code> class contains the
same examples as <code>juneau-examples-rest</code>
+ but also includes the following:
+</p>
+<ul class='spaced-list'>
+ <li>
+ A starter class for invoking the examples using Spring Boot.
+ <li>
+ A resource resolver for resolving REST resources as injectable
beans.
+ <li>
+ A POM that extends from <code>spring-boot-starter-parent</code>
that allows you to build a fully-shaded executable jar.
+ <li>
+ Configuration files for deploying the microservice to Heroku.
+</ul>
+
+<!--
====================================================================================================
-->
+
+<h3 class='topic new' onclick='toggle(this)'><a
href='#juneau-examples-rest-springboot.Installing'
id='juneau-examples-rest-springboot.Installing'>18.1 - Installing in
Eclipse</a></h3>
+<div class='topic'><!-- START: 18.1 -
juneau-examples-rest-springboot.Installing -->
+<p>
+ Follow these instructions to import the REST examples project using
Spring Boot into Eclipse.
+</p>
+<ol class='spaced-list'>
+ <li>
+ Download the latest <l>juneau-examples-rest-springboot.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-examples-rest-springboot.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-examples-rest-springboot.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>Note that we're using the existing Spring Boot application
logic for the microservice and we're retrieving
+ our root resource as a spring bean.
+ <br>Only the top-level resource needs to be annotated with
{@link org.apache.juneau.rest.springboot.annotation.JuneauRestRoot
@JuneauRestRoot}
+ <br><br>
+ <p class='bcode w800'>
+ <ja>@SpringBootApplication</ja>
+ <ja>@Controller</ja>
+ <jk>public class</jk> App {
+
+ <jk>public static void</jk> main(String[] args) {
+ <jk>new</jk>
SpringApplicationBuilder(App.<jk>class</jk>)
+ .initializers(<jk>new</jk>
JuneauRestInitializer(App.<jk>class</jk>))
+ .run(args);
+ }
+
+ <ja>@Bean @JuneauRestRoot</ja>
+ <jk>public</jk> RootResources getRootResources() {
+ <jk>return new</jk> RootResources();
+ }
+ }
+ </p>
+ <li>
+ <l>RootResources.java</l> - The top-level REST resource.
+ <br>This class routes HTTP requests to child resources:
+ <br><br>
+ <p class='bcode w800'>
+ <ja>@RestResource</ja>(
+ path=<js>"/*"</js>,
+ title=<js>"Root resources"</js>,
+ description=<js>"Example of a router resource page."</js>,
+ htmldoc=<ja>@HtmlDoc</ja>(
+ widgets={
+ ContentTypeMenuItem.<jk>class</jk>,
+ ThemeMenuItem.<jk>class</jk>
+ },
+ navlinks={
+ <js>"options: ?method=OPTIONS"</js>,
+ <js>"$W{ContentTypeMenuItem}"</js>,
+ <js>"$W{ThemeMenuItem}"</js>,
+ <js>"source:
$C{Source/gitHub}/org/apache/juneau/examples/rest/$R{servletClassSimple}.java"</js>
+ },
+ aside={
+ <js>"<div style='max-width:400px'
class='text'>"</js>,
+ <js>" <p>This is an example of a
'router' page that serves as a jumping-off point to child
resources.</p>"</js>,
+ <js>" <p>Resources can be nested
arbitrarily deep through router pages.</p>"</js>,
+ <js>" <p>Note the <span
class='link'>options</span> link provided that lets you see the
generated swagger doc for this page.</p>"</js>,
+ <js>" <p>Also note the <span
class='link'>sources</span> link on these pages to view the source
code for the page.</p>"</js>,
+ <js>" <p>All content on pages in the UI
are serialized POJOs. In this case, it's a serialized array of beans with 2
properties, 'name' and 'description'.</p>"</js>,
+ <js>" <p>Other features (such as this
aside) are added through annotations.</p>"</js>,
+ <js>"</div>"</js>
+ }
+ ),
+ properties={
+ <jc>// For testing purposes, we want to use single
quotes in all the serializers so it's easier to do simple
+ // String comparisons.
+ // You can apply any of the
Serializer/Parser/BeanContext settings this way.</jc>
+
<ja>@Property</ja>(name=<jsf>WSERIALIZER_quoteChar</jsf>, value=<js>"'"</js>)
+ },
+ children={
+ HelloWorldResource.<jk>class</jk>,
+ PetStoreResource.<jk>class</jk>,
+ DtoExamples.<jk>class</jk>,
+ ConfigResource.<jk>class</jk>,
+ LogsResource.<jk>class</jk>,
+ ShutdownResource.<jk>class</jk>
+ }
+ )
+ <jk>public class</jk> RootResources <jk>extends</jk>
BasicRestServletJenaGroup {
+ <jc>// No code</jc>
+ }
+ </p>
+ <li>
+ <l>juneau.cfg</l> - The configuration file.
+ <br>Contains various useful settings.
+ <br>Can be used for your own resource configurations.
+ <br>Note that the Jetty configuration is not present.
+ <br>Also it's located in the classpath so that our microservice
can be built as a single executable jar.
+ <br><br>
+ <p class='bcode w800'>
+
<cc>#=======================================================================================================================
+ # Basic configuration file for REST microservices
+ # Subprojects can use this as a starting point.
+
#=======================================================================================================================</cc>
+
+
<cc>#=======================================================================================================================
+ # REST settings
+
#=======================================================================================================================</cc>
+ <cs>[REST]</cs>
+
+ <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>
+ </p>
+</ul>
+<p>
+ At this point, you're ready to start the microservice from your
workspace.
+</p>
+</div><!-- END: 18.1 - juneau-examples-rest-springboot.Installing -->
+
+<!--
====================================================================================================
-->
+
+<h3 class='topic new' onclick='toggle(this)'><a
href='#juneau-examples-rest-springboot.Running'
id='juneau-examples-rest-springboot.Running'>18.2 - Running in Eclipse</a></h3>
+<div class='topic'><!-- START: 18.2 - juneau-examples-rest-springboot.Running
-->
+<p>
+ The <l>juneau-examples-rest-springboot.launch</l> file is already
provided to allow you to quickly start
+ your new microservice.
+</p>
+<p>
+ Go to <b>Run -> Run Configurations -> Java Application ->
juneau-examples-rest-springboot</b> and click <b>Run</b>.
+ <br>In your console view, you should see the following output:
+</p>
+<p class='bpcode w800'>
+ . ____ _ __ _ _
+ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
+ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
+ \\/ ___)| |_)| | | | | || (_| | ) ) ) )
+ ' |____| .__|_| |_|_| |_\__, | / / / /
+ =========|_|==============|___/=/_/_/_/
+ :: Spring Boot :: (v2.0.1.RELEASE)
+ ...
+ INFO: Tomcat started on port(s): 8080 (http) with context path ''
+ Dec 21, 2012 12:30:00 AM org.springframework.boot.StartupInfoLogger
logStarted
+ INFO: Started App in 1.999 seconds (JVM running for 2.999)
+</p>
+<p>
+ Now open your browser and point to <l>http://localhost:5000</l>.
+ You should see the following:
+</p>
+<p class='bpcode w400'>
+ http://localhost:5000
+</p>
+<img class='bordered w400'
src='doc-files/juneau-examples-rest-springboot.Running.1.png'>
+</div><!-- END: 18.2 - juneau-examples-rest-springboot.Running -->
+
+<!--
====================================================================================================
-->
+
+<h3 class='topic new' onclick='toggle(this)'><a
href='#juneau-examples-rest-springboot.Building'
id='juneau-examples-rest-springboot.Building'>18.3 - Building and Running from
Command-Line</a></h3>
+<div class='topic'><!-- START: 18.3 - juneau-examples-rest-springboot.Building
-->
+<p>
+ The <l>pom.xml</l> file is a basic Maven build script for creating your
microservice
+ as an executable uber-jar.
+</p>
+<p>
+ The easiest way to build your microservice is to run the following from
the project root.
+</p>
+<p class='bpcode w800'>
+ mvn clean install
+</p>
+<p>
+ Your <code>target</code> directory should now contain the following
files:
+</p>
+<ul>
+ <li><code>juneau-examples-rest-springboot-1.0.jar</code>
+</ul>
+<p>
+ To start from a command line, run the following command from inside
your <code>target</code> directory:
+</p>
+<p class='bpcode w800'>
+ java -jar juneau-examples-rest-springboot-1.0.jar
+</p>
+<p>
+ You should see the following console output:
+</p>
+<p class='bpcode w800'>
+ . ____ _ __ _ _
+ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
+ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
+ \\/ ___)| |_)| | | | | || (_| | ) ) ) )
+ ' |____| .__|_| |_|_| |_\__, | / / / /
+ =========|_|==============|___/=/_/_/_/
+ :: Spring Boot :: (v2.0.1.RELEASE)
+ ...
+ INFO: Tomcat started on port(s): 8080 (http) with context path ''
+ Dec 21, 2012 12:30:00 AM org.springframework.boot.StartupInfoLogger
logStarted
+ INFO: Started App in 1.999 seconds (JVM running for 2.999)
</p>
-</div><!-- END: 18.1 - juneau-examples-rest-springboot.Classes -->
+</div><!-- END: 18.3 - juneau-examples-rest-springboot.Building -->
<!--
====================================================================================================
-->
-<h3 class='topic todo' onclick='toggle(this)'><a
href='#juneau-examples-rest-springboot.DeployingToHeroku'
id='juneau-examples-rest-springboot.DeployingToHeroku'>18.2 - Deploying to
Heroku</a></h3>
-<div class='topic'><!-- START: 18.2 -
juneau-examples-rest-springboot.DeployingToHeroku -->
+<h3 class='topic todo' onclick='toggle(this)'><a
href='#juneau-examples-rest-springboot.DeployingToHeroku'
id='juneau-examples-rest-springboot.DeployingToHeroku'>18.4 - Deploying to
Heroku</a></h3>
+<div class='topic'><!-- START: 18.4 -
juneau-examples-rest-springboot.DeployingToHeroku -->
<p>
TODO
</p>
-</div><!-- END: 18.2 - juneau-examples-rest-springboot.DeployingToHeroku -->
+</div><!-- END: 18.4 - juneau-examples-rest-springboot.DeployingToHeroku -->
</div><!-- END: 18 - juneau-examples-rest-springboot -->
<!--
====================================================================================================
-->
diff --git a/juneau-doc/src/main/javadoc/resources/docs.txt
b/juneau-doc/src/main/javadoc/resources/docs.txt
index 5ca52f9..907d015 100644
--- a/juneau-doc/src/main/javadoc/resources/docs.txt
+++ b/juneau-doc/src/main/javadoc/resources/docs.txt
@@ -97,13 +97,17 @@ juneau-dto.Swagger = #juneau-dto.Swagger, Overview >
juneau-dto > Swagger
juneau-dto.SwaggerUI = #juneau-dto.SwaggerUI, Overview > juneau-dto > Swagger
UI
juneau-examples-core = #juneau-examples-core, Overview > juneau-examples-core
juneau-examples-core.Examples = #juneau-examples-core.Examples, Overview >
juneau-examples-core > Examples
+juneau-examples-core.Installing = #juneau-examples-core.Installing, Overview >
juneau-examples-core > Installing in Eclipse
juneau-examples-rest = #juneau-examples-rest, Overview > juneau-examples-rest
juneau-examples-rest-jetty = #juneau-examples-rest-jetty, Overview >
juneau-examples-rest-jetty
-juneau-examples-rest-jetty.Classes = #juneau-examples-rest-jetty.Classes,
Overview > juneau-examples-rest-jetty > Classes
-juneau-examples-rest-jetty.DeployingToHeroku =
#juneau-examples-rest-jetty.DeployingToHeroku, Overview >
juneau-examples-rest-jetty > Deploying to Heroku
+juneau-examples-rest-jetty.Building = #juneau-examples-rest-jetty.Building,
Overview > juneau-examples-rest-jetty > Building and Running from Command-Line
+juneau-examples-rest-jetty.Installing =
#juneau-examples-rest-jetty.Installing, Overview > juneau-examples-rest-jetty >
Installing in Eclipse
+juneau-examples-rest-jetty.Running = #juneau-examples-rest-jetty.Running,
Overview > juneau-examples-rest-jetty > Running in Eclipse
juneau-examples-rest-springboot = #juneau-examples-rest-springboot, Overview >
juneau-examples-rest-springboot
-juneau-examples-rest-springboot.Classes =
#juneau-examples-rest-springboot.Classes, Overview >
juneau-examples-rest-springboot > Classes
+juneau-examples-rest-springboot.Building =
#juneau-examples-rest-springboot.Building, Overview >
juneau-examples-rest-springboot > Building and Running from Command-Line
juneau-examples-rest-springboot.DeployingToHeroku =
#juneau-examples-rest-springboot.DeployingToHeroku, Overview >
juneau-examples-rest-springboot > Deploying to Heroku
+juneau-examples-rest-springboot.Installing =
#juneau-examples-rest-springboot.Installing, Overview >
juneau-examples-rest-springboot > Installing in Eclipse
+juneau-examples-rest-springboot.Running =
#juneau-examples-rest-springboot.Running, Overview >
juneau-examples-rest-springboot > Running in Eclipse
juneau-examples-rest.ConfigResource = #juneau-examples-rest.ConfigResource,
Overview > juneau-examples-rest > ConfigResource
juneau-examples-rest.DtoExamples = #juneau-examples-rest.DtoExamples, Overview
> juneau-examples-rest > DtoExamples
juneau-examples-rest.HelloWorldResource =
#juneau-examples-rest.HelloWorldResource, Overview > juneau-examples-rest >
HelloWorldResource
@@ -215,10 +219,6 @@ juneau-microservice-core.Overview =
#juneau-microservice-core.Overview, Overview
juneau-microservice-core.SystemProperties =
#juneau-microservice-core.SystemProperties, Overview > juneau-microservice-core
> System properties
juneau-microservice-core.VarResolver = #juneau-microservice-core.VarResolver,
Overview > juneau-microservice-core > VarResolver
juneau-microservice-jetty = #juneau-microservice-jetty, Overview >
juneau-microservice-jetty
-juneau-my-jetty-microservice = #juneau-my-jetty-microservice, Overview >
juneau-my-jetty-microservice / my-jetty-microservice
-juneau-my-jetty-microservice.Building =
#juneau-my-jetty-microservice.Building, Overview > juneau-my-jetty-microservice
/ my-jetty-microservice > Building and Running from Command-Line
-juneau-my-jetty-microservice.Installing =
#juneau-my-jetty-microservice.Installing, Overview >
juneau-my-jetty-microservice / my-jetty-microservice > Installing in Eclipse
-juneau-my-jetty-microservice.Running = #juneau-my-jetty-microservice.Running,
Overview > juneau-my-jetty-microservice / my-jetty-microservice > Running in
Eclipse
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
@@ -227,10 +227,6 @@ juneau-microservice-jetty.Overview =
#juneau-microservice-jetty.Overview, Overvi
juneau-microservice-jetty.PredefinedResourceClasses =
#juneau-microservice-jetty.PredefinedResourceClasses, Overview >
juneau-microservice-jetty > Predefined Resource Classes
juneau-microservice-jetty.ResourceClasses =
#juneau-microservice-jetty.ResourceClasses, Overview >
juneau-microservice-jetty > Resource Classes
juneau-microservice-jetty.UiCustomization =
#juneau-microservice-jetty.UiCustomization, Overview >
juneau-microservice-jetty > UI Customization
-juneau-my-springboot-microservice = #juneau-my-springboot-microservice,
Overview > juneau-my-springboot-microservice / my-springboot-microservice
-juneau-my-springboot-microservice.Building =
#juneau-my-springboot-microservice.Building, Overview >
juneau-my-springboot-microservice / my-springboot-microservice > Building and
Running from Command-Line
-juneau-my-springboot-microservice.Installing =
#juneau-my-springboot-microservice.Installing, Overview >
juneau-my-springboot-microservice / my-springboot-microservice > Installing in
Eclipse
-juneau-my-springboot-microservice.Running =
#juneau-my-springboot-microservice.Running, Overview >
juneau-my-springboot-microservice / my-springboot-microservice > Running in
Eclipse
juneau-rest-client = #juneau-rest-client, Overview > juneau-rest-client
juneau-rest-client.Authentication = #juneau-rest-client.Authentication,
Overview > juneau-rest-client > Authentication
juneau-rest-client.Authentication.BASIC =
#juneau-rest-client.Authentication.BASIC, Overview > juneau-rest-client >
Authentication > BASIC Authentication
@@ -354,5 +350,13 @@ juneau-svl.OtherNotes = #juneau-svl.OtherNotes, Overview >
juneau-svl > Other No
juneau-svl.SimpleVarLanguage = #juneau-svl.SimpleVarLanguage, Overview >
juneau-svl > Simple Variable Language
juneau-svl.SvlVariables = #juneau-svl.SvlVariables, Overview > juneau-svl >
SVL Variables
juneau-svl.VarResolvers = #juneau-svl.VarResolvers, Overview > juneau-svl >
VarResolvers and VarResolverSessions
+my-jetty-microservice = #my-jetty-microservice, Overview >
my-jetty-microservice
+my-jetty-microservice.Building = #my-jetty-microservice.Building, Overview >
my-jetty-microservice > Building and Running from Command-Line
+my-jetty-microservice.Installing = #my-jetty-microservice.Installing, Overview
> my-jetty-microservice > Installing in Eclipse
+my-jetty-microservice.Running = #my-jetty-microservice.Running, Overview >
my-jetty-microservice > Running in Eclipse
+my-springboot-microservice = #my-springboot-microservice, Overview >
my-springboot-microservice
+my-springboot-microservice.Building = #my-springboot-microservice.Building,
Overview > my-springboot-microservice > Building and Running from Command-Line
+my-springboot-microservice.Installing =
#my-springboot-microservice.Installing, Overview > my-springboot-microservice >
Installing in Eclipse
+my-springboot-microservice.Running = #my-springboot-microservice.Running,
Overview > my-springboot-microservice > Running in Eclipse
package-summary.html = package-summary.html, package-summary.html
this = package-summary.html, package-summary.html
diff --git a/juneau-doc/src/main/javadoc/resources/fragments/toc.html
b/juneau-doc/src/main/javadoc/resources/fragments/toc.html
index 94420d8..83edf6b 100644
--- a/juneau-doc/src/main/javadoc/resources/fragments/toc.html
+++ b/juneau-doc/src/main/javadoc/resources/fragments/toc.html
@@ -360,20 +360,21 @@
<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='new'><a class='doclink'
href='{OVERVIEW_URL}#juneau-my-jetty-microservice'>juneau-my-jetty-microservice
/ my-jetty-microservice</a></p>
+ <li><p class='new'><a class='doclink'
href='{OVERVIEW_URL}#my-jetty-microservice'>my-jetty-microservice</a></p>
<ol>
- <li><p class='updated'><a class='doclink'
href='{OVERVIEW_URL}#juneau-my-jetty-microservice.Installing'>Installing in
Eclipse</a></p>
- <li><p class='updated'><a class='doclink'
href='{OVERVIEW_URL}#juneau-my-jetty-microservice.Running'>Running in
Eclipse</a></p>
- <li><p class='updated'><a class='doclink'
href='{OVERVIEW_URL}#juneau-my-jetty-microservice.Building'>Building and
Running from Command-Line</a></p>
+ <li><p class='updated'><a class='doclink'
href='{OVERVIEW_URL}#my-jetty-microservice.Installing'>Installing in
Eclipse</a></p>
+ <li><p class='updated'><a class='doclink'
href='{OVERVIEW_URL}#my-jetty-microservice.Running'>Running in Eclipse</a></p>
+ <li><p class='updated'><a class='doclink'
href='{OVERVIEW_URL}#my-jetty-microservice.Building'>Building and Running from
Command-Line</a></p>
</ol>
- <li><p class='new'><a class='doclink'
href='{OVERVIEW_URL}#juneau-my-springboot-microservice'>juneau-my-springboot-microservice
/ my-springboot-microservice</a></p>
+ <li><p class='new'><a class='doclink'
href='{OVERVIEW_URL}#my-springboot-microservice'>my-springboot-microservice</a></p>
<ol>
- <li><p class='new'><a class='doclink'
href='{OVERVIEW_URL}#juneau-my-springboot-microservice.Installing'>Installing
in Eclipse</a></p>
- <li><p class='new'><a class='doclink'
href='{OVERVIEW_URL}#juneau-my-springboot-microservice.Running'>Running in
Eclipse</a></p>
- <li><p class='new'><a class='doclink'
href='{OVERVIEW_URL}#juneau-my-springboot-microservice.Building'>Building and
Running from Command-Line</a></p>
+ <li><p class='new'><a class='doclink'
href='{OVERVIEW_URL}#my-springboot-microservice.Installing'>Installing in
Eclipse</a></p>
+ <li><p class='new'><a class='doclink'
href='{OVERVIEW_URL}#my-springboot-microservice.Running'>Running in
Eclipse</a></p>
+ <li><p class='new'><a class='doclink'
href='{OVERVIEW_URL}#my-springboot-microservice.Building'>Building and Running
from Command-Line</a></p>
</ol>
- <li><p class='toc2'><a class='doclink'
href='{OVERVIEW_URL}#juneau-examples-core'>juneau-examples-core</a></p>
+ <li><p class='updated'><a class='doclink'
href='{OVERVIEW_URL}#juneau-examples-core'>juneau-examples-core</a></p>
<ol>
+ <li><p class='new'><a class='doclink'
href='{OVERVIEW_URL}#juneau-examples-core.Installing'>Installing in
Eclipse</a></p>
<li><p class='new'><a class='doclink'
href='{OVERVIEW_URL}#juneau-examples-core.Examples'>Examples</a></p>
</ol>
<li><p class='updated'><a class='doclink'
href='{OVERVIEW_URL}#juneau-examples-rest'>juneau-examples-rest</a></p>
@@ -385,14 +386,17 @@
<li><p class=''><a class='doclink'
href='{OVERVIEW_URL}#juneau-examples-rest.ConfigResource'>ConfigResource</a></p>
<li><p class=''><a class='doclink'
href='{OVERVIEW_URL}#juneau-examples-rest.LogsResource'>LogsResource</a></p>
</ol>
- <li><p class='todo'><a class='doclink'
href='{OVERVIEW_URL}#juneau-examples-rest-jetty'>juneau-examples-rest-jetty</a></p>
+ <li><p class='new'><a class='doclink'
href='{OVERVIEW_URL}#juneau-examples-rest-jetty'>juneau-examples-rest-jetty</a></p>
<ol>
- <li><p class='todo'><a class='doclink'
href='{OVERVIEW_URL}#juneau-examples-rest-jetty.Classes'>Classes</a></p>
- <li><p class='todo'><a class='doclink'
href='{OVERVIEW_URL}#juneau-examples-rest-jetty.DeployingToHeroku'>Deploying to
Heroku</a></p>
+ <li><p class='new'><a class='doclink'
href='{OVERVIEW_URL}#juneau-examples-rest-jetty.Installing'>Installing in
Eclipse</a></p>
+ <li><p class='new'><a class='doclink'
href='{OVERVIEW_URL}#juneau-examples-rest-jetty.Running'>Running in
Eclipse</a></p>
+ <li><p class='new'><a class='doclink'
href='{OVERVIEW_URL}#juneau-examples-rest-jetty.Building'>Building and Running
from Command-Line</a></p>
</ol>
- <li><p class='todo'><a class='doclink'
href='{OVERVIEW_URL}#juneau-examples-rest-springboot'>juneau-examples-rest-springboot</a></p>
+ <li><p class='new'><a class='doclink'
href='{OVERVIEW_URL}#juneau-examples-rest-springboot'>juneau-examples-rest-springboot</a></p>
<ol>
- <li><p class='todo'><a class='doclink'
href='{OVERVIEW_URL}#juneau-examples-rest-springboot.Classes'>Classes</a></p>
+ <li><p class='new'><a class='doclink'
href='{OVERVIEW_URL}#juneau-examples-rest-springboot.Installing'>Installing in
Eclipse</a></p>
+ <li><p class='new'><a class='doclink'
href='{OVERVIEW_URL}#juneau-examples-rest-springboot.Running'>Running in
Eclipse</a></p>
+ <li><p class='new'><a class='doclink'
href='{OVERVIEW_URL}#juneau-examples-rest-springboot.Building'>Building and
Running from Command-Line</a></p>
<li><p class='todo'><a class='doclink'
href='{OVERVIEW_URL}#juneau-examples-rest-springboot.DeployingToHeroku'>Deploying
to Heroku</a></p>
</ol>
<li><p class='toc2'><a class='doclink'
href='{OVERVIEW_URL}#Security'>Security Best-Practices</a></p>
diff --git a/juneau-examples/juneau-examples-rest-jetty/examples.cfg
b/juneau-examples/juneau-examples-rest-jetty/juneau-examples-rest-jetty.cfg
similarity index 100%
rename from juneau-examples/juneau-examples-rest-jetty/examples.cfg
rename to
juneau-examples/juneau-examples-rest-jetty/juneau-examples-rest-jetty.cfg
diff --git
a/juneau-microservice/juneau-my-jetty-microservice/my-jetty-microservice.cfg
b/juneau-microservice/juneau-my-jetty-microservice/my-jetty-microservice.cfg
index c81d135..10e488f 100755
--- a/juneau-microservice/juneau-my-jetty-microservice/my-jetty-microservice.cfg
+++ b/juneau-microservice/juneau-my-jetty-microservice/my-jetty-microservice.cfg
@@ -41,7 +41,14 @@ port = 10000,0,0,0
#=======================================================================================================================
[REST]
-# URL mappings to static files in the working directory or classpath.
+# Comma-delimited list of key-value pairs that represent locations of static
files that can be served up by your @RestResource-annotated
+# classes. These are static files that are served up by the servlet under the
specified sub-paths.
+# For example, given the following setting...
+# staticFiles = htdocs:my-docs,styles/my-styles
+# ...the URI "/servletPath/htdocs/javadoc.css" resolves to the path
"/my-docs/javadoc.css".
+# This path can be relative to the working directory, classpath root, or
package of your resource class.
+# Used by the BasicRestConfig interface that defines the following value:
+# staticFiles="$C{REST/staticFiles}"
staticFiles = htdocs:htdocs
# Stylesheet to use for HTML views.