juneau-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jamesbog...@apache.org
Subject [juneau] branch master updated: New BasicRest and BasicRestGroup classes.
Date Wed, 02 Jan 2019 21:01:41 GMT
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 d993ccd  New BasicRest and BasicRestGroup classes.
d993ccd is described below

commit d993ccda84da021f5dff5eda432e054c2b6e91f2
Author: JamesBognar <jamesbognar@apache.org>
AuthorDate: Wed Jan 2 16:01:27 2019 -0500

    New BasicRest and BasicRestGroup classes.
---
 juneau-doc/docs/ReleaseNotes/8.0.1.html            |  16 +-
 .../07.juneau-rest-server/02.ClassHierarchy.html   |  43 ++--
 .../03.Instantiation/03.BasicRest.html             |  96 ++++++++
 .../{03.Children.html => 04.Children.html}         |   0
 ...terPages.html => 05.BasicRestServletGroup.html} |   5 +-
 .../03.Instantiation/06.BasicRestGroup.html}       |  41 ++--
 ...rceResolvers.html => 07.ResourceResolvers.html} |   0
 ....LifecycleHooks.html => 08.LifecycleHooks.html} |   0
 .../01.Overview.html                               |   3 +-
 .../02.ChildResources.html                         |  83 +++++++
 .../01.RestProxies/10.DualPurposeInterfaces.html   |   2 +-
 .../03.PetStoreResource.html                       |   6 +-
 juneau-doc/src/main/javadoc/overview.html          | 273 ++++++++++++++++++---
 juneau-doc/src/main/javadoc/resources/docs.txt     |   5 +-
 .../src/main/javadoc/resources/fragments/toc.html  |   7 +-
 .../juneau/examples/rest/RequestEchoResource.java  |   3 +-
 .../rest/petstore/rest/PetStoreResource.java       |   2 +-
 .../java/org/apache/juneau/rest/BasicRestJena.java |  41 ++++
 .../org/apache/juneau/rest/BasicRestJenaGroup.java |  39 +++
 .../java/org/apache/juneau/rest/BasicRest.java     | 101 ++++++++
 .../org/apache/juneau/rest/BasicRestGroup.java     |  45 ++++
 21 files changed, 723 insertions(+), 88 deletions(-)

diff --git a/juneau-doc/docs/ReleaseNotes/8.0.1.html b/juneau-doc/docs/ReleaseNotes/8.0.1.html
index 74cc979..9667543 100644
--- a/juneau-doc/docs/ReleaseNotes/8.0.1.html
+++ b/juneau-doc/docs/ReleaseNotes/8.0.1.html
@@ -13,7 +13,7 @@
  ***************************************************************************************************************************/
  -->
 
-8.0.0 (TBD)
+8.0.1 (TBD)
 
 <p>
 	TBD
@@ -42,3 +42,17 @@
 		
 </ul>
 
+<h5 class='topic w800'>juneau-rest-server</h5>
+<ul class='spaced-list'>
+	<li>
+		Added the following classes that provide the same support as the servlet classes but doesn't extend from <code>HttpServlet</code>.
+		<br>This fixes an issue where instances of {@link oajr.BasicRestServlet} are registered as top-level servlets even though
+		you don't want them to be.  
+		<ul>
+			<li class='jac'>{@link oajr.BasicRest} - Non-servlet equivalent to {@link oajr.BasicRestServlet}
+			<li class='jac'>{@link oajr.BasicRestGroup} - Non-servlet equivalent to {@link oajr.BasicRestServletGroup}
+			<li class='jac'>{@link oajr.BasicRestJena} - Non-servlet equivalent to {@link oajr.BasicRestServletJena}
+			<li class='jac'>{@link oajr.BasicRestJenaGroup} - Non-servlet equivalent to {@link oajr.BasicRestServletJenaGroup}
+		</ul>
+</ul>
+
diff --git a/juneau-doc/docs/Topics/07.juneau-rest-server/02.ClassHierarchy.html b/juneau-doc/docs/Topics/07.juneau-rest-server/02.ClassHierarchy.html
index 363dc8a..62acfa9 100644
--- a/juneau-doc/docs/Topics/07.juneau-rest-server/02.ClassHierarchy.html
+++ b/juneau-doc/docs/Topics/07.juneau-rest-server/02.ClassHierarchy.html
@@ -13,21 +13,7 @@
  ***************************************************************************************************************************/
  -->
 
-Class Hierarchy
-<!--
-/***************************************************************************************************************************
- * 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.
- ***************************************************************************************************************************/
- -->
+{updated} Class Hierarchy
 
 <p>
 	The class hierarchy for the REST servlet class is shown below:
@@ -54,6 +40,33 @@ Class Hierarchy
 	</li>
 </ul>
 <p>
+	For top-level resources, you'll typically extend from one of the classes above.
+</p>
+<p>
+	For child resources, you can either extend from one of the classes above, or extend from one of the following
+	that provides identical support but does not extent from <code>HttpServlet</code>:
+</p>
+<ul class='doctree'>
+	<li class='jic'>
+		{@link oajr.BasicRestConfig} 
+		<ul>
+			<li class='jac'>{@link oajr.BasicRest org.apache.juneau.rest.BasicRest}
+				<br>Provides a default set of serializers, parsers, options page, stylesheet, and other common settings.
+				<ul>
+					<li class='jac'>{@link oajr.BasicRestGroup org.apache.juneau.rest.BasicRestGroup}
+						<br>A default implementation for "router" pages.
+					</li>
+				</ul>
+			</li>
+		</ul>
+	</li>
+</ul>
+<p>
+	One reason to use the latter classes as your base classes is when you're implementing REST resources as 
+	<ja>@Bean</ja>-annotated Spring Beans and you don't want them to be automatically registered as top-level servlets.
+</p>
+
+<p>
 	The servlets with RDF support require Jena on the classpath.  
 	All other serializers and parsers do not have any external library dependencies.
 	For this reason, we have separate servlets for supporting RDF so that you don't need Jena if you don't need to 
diff --git a/juneau-doc/docs/Topics/07.juneau-rest-server/03.Instantiation/03.BasicRest.html b/juneau-doc/docs/Topics/07.juneau-rest-server/03.Instantiation/03.BasicRest.html
new file mode 100644
index 0000000..1c70f3d
--- /dev/null
+++ b/juneau-doc/docs/Topics/07.juneau-rest-server/03.Instantiation/03.BasicRest.html
@@ -0,0 +1,96 @@
+<!--
+/***************************************************************************************************************************
+ * 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.
+ ***************************************************************************************************************************/
+ -->
+
+{new} BasicRest
+
+<p>
+	The {@link oajr.BasicRest} class is identical to the {@link oajr.BasicRestServlet} class except that
+	it does not extend from <code>HttpServlet</code>.
+	It defines the exact same set of serializers, parsers, etc., but it cannot be deployed as a top-level
+	servlet.  It can however be used for child resources registered via the {@link oajr.annotation.RestResource#children() @RestResource(children)} 
+	annotation. 
+</p>
+<p>
+	The code for this class is virtually identical to {@link oaj.BasicRestServlet} but lacks a parent class:
+</p>
+<p class='bpcode w800'>
+	<ja>@RestResource</ja>(
+	
+		<jc>// Allow OPTIONS requests to be simulated using ?method=OPTIONS query parameter. </jc>
+		allowedMethodParams=<js>"OPTIONS"</js>,
+		
+		<jc>// HTML-page specific settings.</jc>
+		htmldoc=<ja>@HtmlDoc</ja>(
+			<jc>// Basic page navigation links.</jc>
+			navlinks={
+				<js>"up: request:/.."</js>,
+				<js>"options: servlet:/?method=OPTIONS"</js>
+			}
+		)
+	)
+	<jk>public abstract class</jk> BasicRest <jk>implements</jk> BasicRestConfig {
+	
+		<jd>/**
+		 * [OPTIONS /*] - Show resource options.
+		 *
+		 * <ja>@param</ja> req The HTTP request.
+		 * <ja>@return</ja> A bean containing the contents for the OPTIONS page.
+		 */</jd>
+		<ja>@RestMethod</ja>(name=<jsf>OPTIONS</jsf>, path=<js>"/*"</js>,
+			
+			summary=<js>"Swagger documentation"</js>,
+			description=<js>"Swagger documentation for this resource."</js>,
+			
+			htmldoc=<ja>@HtmlDoc</ja>(
+				<jc>// Override the nav links for the swagger page.</jc>
+				navlinks={
+					<js>"back: servlet:/"</js>,
+					<js>"json: servlet:/?method=OPTIONS&amp;Accept=text/json&amp;plainText=true"</js>
+				},
+				<jc>// Never show aside contents of page inherited from class.</jc>
+				aside=<js>"NONE"</js>
+			),
+		
+			<jc>// POJO swaps to apply to all serializers/parsers.</jc>
+			pojoSwaps={
+				<jc>// Use the SwaggerUI swap when rendering Swagger beans.</jc>
+				SwaggerUI.<jk>class</jk>
+			},
+			
+			<jc>// Properties to apply to all serializers/parsers and REST-specific API objects.</jc>
+			properties={
+				<jc>// Add descriptions to the following types when not specified:</jc>
+				<ja>@Property</ja>(name=<jsf>JSONSCHEMA_addDescriptionsTo</jsf>, value=<js>"bean,collection,array,map,enum"</js>),
+		
+				<jc>// Automatically add examples to the following types:</jc>
+				<ja>@Property</ja>(name=<jsf>JSONSCHEMA_addExamplesTo</jsf>, value=<js>"bean,collection,array,map"</js>),
+		
+				<jc>// Don't generate schema information on the Swagger bean itself or HTML beans.</jc>
+				<ja>@Property</ja>(name=<jsf>JSONSCHEMA_ignoreTypes</jsf>, value="<js>Swagger,org.apache.juneau.dto.html5.*"</js>)
+			},
+			
+			<jc>// Shortcut for boolean properties.</jc>
+			flags={
+				<jc>// Use $ref references for bean definitions to reduce duplication in Swagger.</jc>
+				<jsf>JSONSCHEMA_useBeanDefs</jsf>
+			}
+		)
+		<jk>public</jk> Swagger getOptions(RestRequest req) {
+			<jc>// Localized Swagger for this resource is available through the RestRequest object.</jc>
+			<jk>return</jk> req.getSwagger();
+		}
+	}
+</p>
+
diff --git a/juneau-doc/docs/Topics/07.juneau-rest-server/03.Instantiation/03.Children.html b/juneau-doc/docs/Topics/07.juneau-rest-server/03.Instantiation/04.Children.html
similarity index 100%
rename from juneau-doc/docs/Topics/07.juneau-rest-server/03.Instantiation/03.Children.html
rename to juneau-doc/docs/Topics/07.juneau-rest-server/03.Instantiation/04.Children.html
diff --git a/juneau-doc/docs/Topics/07.juneau-rest-server/03.Instantiation/04.RouterPages.html b/juneau-doc/docs/Topics/07.juneau-rest-server/03.Instantiation/05.BasicRestServletGroup.html
similarity index 96%
rename from juneau-doc/docs/Topics/07.juneau-rest-server/03.Instantiation/04.RouterPages.html
rename to juneau-doc/docs/Topics/07.juneau-rest-server/03.Instantiation/05.BasicRestServletGroup.html
index 8786ad1..fedff50 100644
--- a/juneau-doc/docs/Topics/07.juneau-rest-server/03.Instantiation/04.RouterPages.html
+++ b/juneau-doc/docs/Topics/07.juneau-rest-server/03.Instantiation/05.BasicRestServletGroup.html
@@ -13,7 +13,7 @@
  ***************************************************************************************************************************/
  -->
 
-Router Pages
+{updated} BasicRestServletGroup
 
 <p>
 	The {@link oajr.BasicRestServletGroup} class provides a default "router" page for 
@@ -33,12 +33,9 @@ Router Pages
 		children={
 			HelloWorldResource.<jk>class</jk>,
 			PetStoreResource.<jk>class</jk>,
-			PhotosResource.<jk>class</jk>,
 			DtoExamples.<jk>class</jk>,
-			SqlQueryResource.<jk>class</jk>,
 			ConfigResource.<jk>class</jk>,
 			LogsResource.<jk>class</jk>,
-			DebugResource.<jk>class</jk>,
 			ShutdownResource.<jk>class</jk>
 		}
 	)
diff --git a/juneau-doc/docs/ReleaseNotes/8.0.1.html b/juneau-doc/docs/Topics/07.juneau-rest-server/03.Instantiation/06.BasicRestGroup.html
similarity index 55%
copy from juneau-doc/docs/ReleaseNotes/8.0.1.html
copy to juneau-doc/docs/Topics/07.juneau-rest-server/03.Instantiation/06.BasicRestGroup.html
index 74cc979..b119b98 100644
--- a/juneau-doc/docs/ReleaseNotes/8.0.1.html
+++ b/juneau-doc/docs/Topics/07.juneau-rest-server/03.Instantiation/06.BasicRestGroup.html
@@ -13,32 +13,23 @@
  ***************************************************************************************************************************/
  -->
 
-8.0.0 (TBD)
+{new} BasicRestGroup
 
 <p>
-	TBD
+	The {@link oajr.BasicRestGroup} class is identical to the {@link oajr.BasicRestServletGroup} class except that
+	it does not extend from <code>HttpServlet</code>.
+	It defines the exact same set of serializers, parsers, etc., but it cannot be deployed as a top-level
+	servlet.  It can however be used for child resources registered via the {@link oajr.annotation.RestResource#children() @RestResource(children)} 
+	annotation. 
 </p>
-
-<h5 class='topic w800'>juneau-config</h5>
-<ul class='spaced-list'>
-	<li>
-		Support for import statements:
-		<p class='bpcode'>
-	<cc># Import values from another configuration:</cc>
-	<ci>&lt;ParentConfig1&gt;</ci>
+<p class='bpcode w800'>
+	<jc>// The entire contents of the BasicRestGroup class.</jc>
 	
-	<cs>[Foo]</cs>
-	<ck>bar</ck> = <cv>baz</cv>
-		</p>
-	<li>
-		The {@link oaj.config.store.ConfigFileStore} now automatically resolves file extensions.
-		<br>New configuration property for specifying search paths for file extensions:
-		<ul class='doctree'>
-			<li class='jf'>{@link oaj.config.store.ConfigFileStore#FILESTORE_extensions}
-		</ul>
-	<li>
-		Fixed a bug where instances of {@link oaj.config.store.ConfigMemoryStore} ended up resolving to the same object.
-	<li>
-		
-</ul>
-
+	<jk>public class</jk> BasicRestGroup <jk>extends</jk> BasicRest {
+	
+		<ja>@RestMethod</ja>(name=<jsf>GET</jsf>, path=<js>"/"</js>, description=<js>"Child resources"</js>)
+		<jk>public</jk> ChildResourceDescriptions getChildren(RestRequest req) {
+			<jk>return new</jk> ChildResourceDescriptions(<jk>this</jk>, req);
+		}
+	}		
+</p>
diff --git a/juneau-doc/docs/Topics/07.juneau-rest-server/03.Instantiation/05.ResourceResolvers.html b/juneau-doc/docs/Topics/07.juneau-rest-server/03.Instantiation/07.ResourceResolvers.html
similarity index 100%
rename from juneau-doc/docs/Topics/07.juneau-rest-server/03.Instantiation/05.ResourceResolvers.html
rename to juneau-doc/docs/Topics/07.juneau-rest-server/03.Instantiation/07.ResourceResolvers.html
diff --git a/juneau-doc/docs/Topics/07.juneau-rest-server/03.Instantiation/06.LifecycleHooks.html b/juneau-doc/docs/Topics/07.juneau-rest-server/03.Instantiation/08.LifecycleHooks.html
similarity index 100%
rename from juneau-doc/docs/Topics/07.juneau-rest-server/03.Instantiation/06.LifecycleHooks.html
rename to juneau-doc/docs/Topics/07.juneau-rest-server/03.Instantiation/08.LifecycleHooks.html
diff --git a/juneau-doc/docs/Topics/09.juneau-rest-server-springboot/01.Overview.html b/juneau-doc/docs/Topics/09.juneau-rest-server-springboot/01.Overview.html
index 7d22757..a480802 100644
--- a/juneau-doc/docs/Topics/09.juneau-rest-server-springboot/01.Overview.html
+++ b/juneau-doc/docs/Topics/09.juneau-rest-server-springboot/01.Overview.html
@@ -73,4 +73,5 @@ Overview
 <p>
 	 The {@doc juneau-examples-rest-springboot} section describes how the Examples REST application is deployed
 	 using Spring Boot and quickly deployable as an online application using Heroku.
-</p>
\ No newline at end of file
+</p>
+
diff --git a/juneau-doc/docs/Topics/09.juneau-rest-server-springboot/02.ChildResources.html b/juneau-doc/docs/Topics/09.juneau-rest-server-springboot/02.ChildResources.html
new file mode 100644
index 0000000..7d72a9c
--- /dev/null
+++ b/juneau-doc/docs/Topics/09.juneau-rest-server-springboot/02.ChildResources.html
@@ -0,0 +1,83 @@
+<!--
+/***************************************************************************************************************************
+ * 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.
+ ***************************************************************************************************************************/
+ -->
+
+{new} Child Resources
+
+<p>
+	When using the <ja>@JuneauRestRoot</ja> annotation, servlet are given an instance of {@link oajr.springboot.SpringRestResourceResolver}.  
+	The resource resolver gets passed down through the children hierarchy, allowing child resources to be defined as injectable Spring beans.
+</p>
+<h5 class='figure'>Example:</h5>
+<p class='bpcode w800'>
+	<ja>@Configuration</ja>
+	<jk>public class</jk> AppConfiguration {
+	
+		<ja>@Bean @JuneauRestRoot</ja>
+		<jk>public</jk> RootResource getRootResource() {
+			<jk>return new</jk> RootResource();
+		}
+
+		<ja>@Bean</ja>
+		<jk>public</jk> ChildResource getChildResource() {
+			<jk>return new</jk> ChildResource();
+		}
+
+		<ja>@Bean</ja>
+		<jk>public</jk> GrandChildResource getGrandChildResource() {
+			<jk>return new</jk> GrandChildResource(); 
+		}
+	}
+</p>
+<p>
+	The root resource class must extend from <code>HttpServlet</code> so that it can be registered as a normal
+	servlet using the Spring Boot architecture.  The {@link oajr.BasicRestServletGroup} class is our router class
+	that extends from <code>HttpServlet</code>:
+</p>
+<p class='bpcode w800'>
+	<ja>@RestResource</ja>(
+		path=<js>"/root"</js>,
+		children={
+			ChildResource.<jk>class</jk>
+		}
+	)
+	<jk>public class</jk> RootResource <jk>extends</jk> BasicRestServletGroup {
+		<jc>// No code needed.</jc>
+	}
+</p>
+<p>
+	Because Spring Boot will automatically register any beans that extend from <code>HttpServlet</code>, we
+	DON'T want the child classes to extend from <code>HttpServlet</code>.  Instead, we extend from
+	{@link oajr.BasicRestGroup} and {@link oajr.BasicRest} instead:
+</p>
+
+<p class='bpcode w800'>
+	<ja>@RestResource</ja>(
+		path=<js>"/child"</js>,
+		children={
+			GrandChildResource.<jk>class</jk>
+		}
+	)
+	<jk>public class</jk> ChildResource <jk>extends</jk> BasicRestGroup {
+		<jc>// No code needed.</jc>
+	}
+</p>
+<p class='bpcode w800'>
+	<ja>@RestResource</ja>(
+		path=<js>"/grandchild"</js>
+	)
+	<jk>public class</jk> GrandChildResource <jk>extends</jk> BasicRest {
+		<jc>// Injectable bean</jc>
+	}
+</p>
diff --git a/juneau-doc/docs/Topics/10.juneau-rest-client/01.RestProxies/10.DualPurposeInterfaces.html b/juneau-doc/docs/Topics/10.juneau-rest-client/01.RestProxies/10.DualPurposeInterfaces.html
index e2afff1..08fbb57 100644
--- a/juneau-doc/docs/Topics/10.juneau-rest-client/01.RestProxies/10.DualPurposeInterfaces.html
+++ b/juneau-doc/docs/Topics/10.juneau-rest-client/01.RestProxies/10.DualPurposeInterfaces.html
@@ -65,7 +65,7 @@ Dual-purpose (end-to-end) interfaces
 		title=<js>"Petstore application"</js>,
 		...
 	)
-	<jk>public class</jk> PetStoreResource <jk>extends</jk> BasicRestServletJena <jk>implements</jk> PetStore {
+	<jk>public class</jk> PetStoreResource <jk>extends</jk> BasicRestJena <jk>implements</jk> PetStore {
 	
 		...
 	
diff --git a/juneau-doc/docs/Topics/16.juneau-examples-rest/03.PetStoreResource.html b/juneau-doc/docs/Topics/16.juneau-examples-rest/03.PetStoreResource.html
index 7ea2c4f..2c8c468 100644
--- a/juneau-doc/docs/Topics/16.juneau-examples-rest/03.PetStoreResource.html
+++ b/juneau-doc/docs/Topics/16.juneau-examples-rest/03.PetStoreResource.html
@@ -82,7 +82,7 @@ PetStore
 			PhotosResource.<jk>class</jk>
 		}
 	)
-	<jk>public class</jk> PetStoreResource <jk>extends</jk> BasicRestServletJena {
+	<jk>public class</jk> PetStoreResource <jk>extends</jk> BasicRestJena {
 </p>
 <p>
 	The inner contents of the page are generated from this method which is used to define a jumping-off
@@ -248,7 +248,7 @@ PetStore
 </p>
 <h5 class='figure'>PetStoreResource.java</h5>
 <p class='bpcode w800'>
-	<jk>public class</jk> PetStoreResource <jk>extends</jk> BasicRestServletJena <jk>implements</jk> PetStore {
+	<jk>public class</jk> PetStoreResource <jk>extends</jk> BasicRestJena <jk>implements</jk> PetStore {
 	
 		<jk>private</jk> PetStoreService <jf>store</jf>;
 	
@@ -448,7 +448,7 @@ PetStore
 </p>
 <h5 class='figure'>PetStoreResource.java</h5>
 <p class='bpcode w800'>
-	<jk>public class</jk> PetStoreResource <jk>extends</jk> BasicRestServletJena <jk>implements</jk> PetStore {
+	<jk>public class</jk> PetStoreResource <jk>extends</jk> BasicRestJena <jk>implements</jk> PetStore {
 	
 		<ja>@Override</ja> <jc>/* PetStore */</jc>
 		<ja>@RestMethod</ja>(
diff --git a/juneau-doc/src/main/javadoc/overview.html b/juneau-doc/src/main/javadoc/overview.html
index fb35174..a415849 100644
--- a/juneau-doc/src/main/javadoc/overview.html
+++ b/juneau-doc/src/main/javadoc/overview.html
@@ -253,13 +253,15 @@
 	<li><p class='toc2'><a class='doclink' href='#juneau-rest-server'>juneau-rest-server</a></p>
 	<ol>
 		<li><p class=''><a class='doclink' href='#juneau-rest-server.HelloWorldExample'>Hello World Example</a></p>
-		<li><p class=''><a class='doclink' href='#juneau-rest-server.ClassHierarchy'>Class Hierarchy</a></p>
+		<li><p class='updated'><a class='doclink' href='#juneau-rest-server.ClassHierarchy'>Class Hierarchy</a></p>
 		<li><p class=''><a class='doclink' href='#juneau-rest-server.Instantiation'>Instantiation</a></p>
 		<ol>
 			<li><p class=''><a class='doclink' href='#juneau-rest-server.Instantiation.RestServlet'>RestServlet</a></p>
 			<li><p class=''><a class='doclink' href='#juneau-rest-server.Instantiation.BasicRestServlet'>BasicRestServlet</a></p>
+			<li><p class='new'><a class='doclink' href='#juneau-rest-server.Instantiation.BasicRest'>BasicRest</a></p>
 			<li><p class=''><a class='doclink' href='#juneau-rest-server.Instantiation.Children'>Children</a></p>
-			<li><p class=''><a class='doclink' href='#juneau-rest-server.Instantiation.RouterPages'>Router Pages</a></p>
+			<li><p class='updated'><a class='doclink' href='#juneau-rest-server.Instantiation.BasicRestServletGroup'>BasicRestServletGroup</a></p>
+			<li><p class='new'><a class='doclink' href='#juneau-rest-server.Instantiation.BasicRestGroup'>BasicRestGroup</a></p>
 			<li><p class=''><a class='doclink' href='#juneau-rest-server.Instantiation.ResourceResolvers'>Resource Resolvers</a></p>
 			<li><p class=''><a class='doclink' href='#juneau-rest-server.Instantiation.LifecycleHooks'>Lifecycle Hooks</a></p>
 		</ol>
@@ -363,6 +365,7 @@
 	<li><p class='toc2'><a class='doclink' href='#juneau-rest-server-springboot'>juneau-rest-server-springboot</a></p>
 	<ol>
 		<li><p class=''><a class='doclink' href='#juneau-rest-server-springboot.Overview'>Overview</a></p>
+		<li><p class='new'><a class='doclink' href='#juneau-rest-server-springboot.ChildResources'>Child Resources</a></p>
 	</ol>
 	<li><p class='toc2'><a class='doclink' href='#juneau-rest-client'>juneau-rest-client</a></p>
 	<ol>
@@ -13122,23 +13125,8 @@
 
 <!-- ==================================================================================================== -->
 
-<h3 class='topic ' onclick='toggle(this)'><a href='#juneau-rest-server.ClassHierarchy' id='juneau-rest-server.ClassHierarchy'>7.2 - Class Hierarchy</a></h3>
+<h3 class='topic updated' onclick='toggle(this)'><a href='#juneau-rest-server.ClassHierarchy' id='juneau-rest-server.ClassHierarchy'>7.2 - Class Hierarchy</a></h3>
 <div class='topic'><!-- START: 7.2 - juneau-rest-server.ClassHierarchy -->
-<!--
-/***************************************************************************************************************************
- * 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.
- ***************************************************************************************************************************/
- -->
-
 <p>
 	The class hierarchy for the REST servlet class is shown below:
 </p>
@@ -13164,6 +13152,33 @@
 	</li>
 </ul>
 <p>
+	For top-level resources, you'll typically extend from one of the classes above.
+</p>
+<p>
+	For child resources, you can either extend from one of the classes above, or extend from one of the following
+	that provides identical support but does not extent from <code>HttpServlet</code>:
+</p>
+<ul class='doctree'>
+	<li class='jic'>
+		{@link org.apache.juneau.rest.BasicRestConfig} 
+		<ul>
+			<li class='jac'>{@link org.apache.juneau.rest.BasicRest org.apache.juneau.rest.BasicRest}
+				<br>Provides a default set of serializers, parsers, options page, stylesheet, and other common settings.
+				<ul>
+					<li class='jac'>{@link org.apache.juneau.rest.BasicRestGroup org.apache.juneau.rest.BasicRestGroup}
+						<br>A default implementation for "router" pages.
+					</li>
+				</ul>
+			</li>
+		</ul>
+	</li>
+</ul>
+<p>
+	One reason to use the latter classes as your base classes is when you're implementing REST resources as 
+	<ja>@Bean</ja>-annotated Spring Beans and you don't want them to be automatically registered as top-level servlets.
+</p>
+
+<p>
 	The servlets with RDF support require Jena on the classpath.  
 	All other serializers and parsers do not have any external library dependencies.
 	For this reason, we have separate servlets for supporting RDF so that you don't need Jena if you don't need to 
@@ -13461,8 +13476,92 @@
 
 <!-- ==================================================================================================== -->
 
-<h4 class='topic ' onclick='toggle(this)'><a href='#juneau-rest-server.Instantiation.Children' id='juneau-rest-server.Instantiation.Children'>7.3.3 - Children</a></h4>
-<div class='topic'><!-- START: 7.3.3 - juneau-rest-server.Instantiation.Children -->
+<h4 class='topic new' onclick='toggle(this)'><a href='#juneau-rest-server.Instantiation.BasicRest' id='juneau-rest-server.Instantiation.BasicRest'>7.3.3 - BasicRest</a></h4>
+<div class='topic'><!-- START: 7.3.3 - juneau-rest-server.Instantiation.BasicRest -->
+<p>
+	The {@link org.apache.juneau.rest.BasicRest} class is identical to the {@link org.apache.juneau.BasicRestServlet} class except that
+	it does not extend from <code>HttpServlet</code>.
+	It defines the exact same set of serializers, parsers, etc., but it cannot be deployed as a top-level
+	servlet.  It can however be used for child resources registered via the {@link org.apache.juneau.rest.annotation.RestResource#children() @RestResource(children)} 
+	annotation. 
+</p>
+<p>
+	The code for this class is virtually identical to {@link org.apache.juneau.BasicRestServlet} but lacks a parent class:
+</p>
+<p class='bpcode w800'>
+	<ja>@RestResource</ja>(
+	
+		<jc>// Allow OPTIONS requests to be simulated using ?method=OPTIONS query parameter. </jc>
+		allowedMethodParams=<js>"OPTIONS"</js>,
+		
+		<jc>// HTML-page specific settings.</jc>
+		htmldoc=<ja>@HtmlDoc</ja>(
+			<jc>// Basic page navigation links.</jc>
+			navlinks={
+				<js>"up: request:/.."</js>,
+				<js>"options: servlet:/?method=OPTIONS"</js>
+			}
+		)
+	)
+	<jk>public abstract class</jk> BasicRest <jk>implements</jk> BasicRestConfig {
+	
+		<jd>/**
+		 * [OPTIONS /*] - Show resource options.
+		 *
+		 * <ja>@param</ja> req The HTTP request.
+		 * <ja>@return</ja> A bean containing the contents for the OPTIONS page.
+		 */</jd>
+		<ja>@RestMethod</ja>(name=<jsf>OPTIONS</jsf>, path=<js>"/*"</js>,
+			
+			summary=<js>"Swagger documentation"</js>,
+			description=<js>"Swagger documentation for this resource."</js>,
+			
+			htmldoc=<ja>@HtmlDoc</ja>(
+				<jc>// Override the nav links for the swagger page.</jc>
+				navlinks={
+					<js>"back: servlet:/"</js>,
+					<js>"json: servlet:/?method=OPTIONS&amp;Accept=text/json&amp;plainText=true"</js>
+				},
+				<jc>// Never show aside contents of page inherited from class.</jc>
+				aside=<js>"NONE"</js>
+			),
+		
+			<jc>// POJO swaps to apply to all serializers/parsers.</jc>
+			pojoSwaps={
+				<jc>// Use the SwaggerUI swap when rendering Swagger beans.</jc>
+				SwaggerUI.<jk>class</jk>
+			},
+			
+			<jc>// Properties to apply to all serializers/parsers and REST-specific API objects.</jc>
+			properties={
+				<jc>// Add descriptions to the following types when not specified:</jc>
+				<ja>@Property</ja>(name=<jsf>JSONSCHEMA_addDescriptionsTo</jsf>, value=<js>"bean,collection,array,map,enum"</js>),
+		
+				<jc>// Automatically add examples to the following types:</jc>
+				<ja>@Property</ja>(name=<jsf>JSONSCHEMA_addExamplesTo</jsf>, value=<js>"bean,collection,array,map"</js>),
+		
+				<jc>// Don't generate schema information on the Swagger bean itself or HTML beans.</jc>
+				<ja>@Property</ja>(name=<jsf>JSONSCHEMA_ignoreTypes</jsf>, value="<js>Swagger,org.apache.juneau.dto.html5.*"</js>)
+			},
+			
+			<jc>// Shortcut for boolean properties.</jc>
+			flags={
+				<jc>// Use $ref references for bean definitions to reduce duplication in Swagger.</jc>
+				<jsf>JSONSCHEMA_useBeanDefs</jsf>
+			}
+		)
+		<jk>public</jk> Swagger getOptions(RestRequest req) {
+			<jc>// Localized Swagger for this resource is available through the RestRequest object.</jc>
+			<jk>return</jk> req.getSwagger();
+		}
+	}
+</p>
+</div><!-- END: 7.3.3 - juneau-rest-server.Instantiation.BasicRest -->
+
+<!-- ==================================================================================================== -->
+
+<h4 class='topic ' onclick='toggle(this)'><a href='#juneau-rest-server.Instantiation.Children' id='juneau-rest-server.Instantiation.Children'>7.3.4 - Children</a></h4>
+<div class='topic'><!-- START: 7.3.4 - juneau-rest-server.Instantiation.Children -->
 <p>
 	Child Resources are REST servlets or objects that are linked to parent resources through the 
 	{@link org.apache.juneau.rest.annotation.RestResource#children() @RestResource(children)} annotation.
@@ -13497,12 +13596,12 @@
 <ul>
 	<li class='jf'>{@link org.apache.juneau.rest.RestContext#REST_children}
 </ul>
-</div><!-- END: 7.3.3 - juneau-rest-server.Instantiation.Children -->
+</div><!-- END: 7.3.4 - juneau-rest-server.Instantiation.Children -->
 
 <!-- ==================================================================================================== -->
 
-<h4 class='topic ' onclick='toggle(this)'><a href='#juneau-rest-server.Instantiation.RouterPages' id='juneau-rest-server.Instantiation.RouterPages'>7.3.4 - Router Pages</a></h4>
-<div class='topic'><!-- START: 7.3.4 - juneau-rest-server.Instantiation.RouterPages -->
+<h4 class='topic updated' onclick='toggle(this)'><a href='#juneau-rest-server.Instantiation.BasicRestServletGroup' id='juneau-rest-server.Instantiation.BasicRestServletGroup'>7.3.5 - BasicRestServletGroup</a></h4>
+<div class='topic'><!-- START: 7.3.5 - juneau-rest-server.Instantiation.BasicRestServletGroup -->
 <p>
 	The {@link org.apache.juneau.rest.BasicRestServletGroup} class provides a default "router" page for 
 	child resources when a parent resource is nothing more than a grouping of child resources.
@@ -13559,12 +13658,36 @@
 		}
 	}		
 </p>
-</div><!-- END: 7.3.4 - juneau-rest-server.Instantiation.RouterPages -->
+</div><!-- END: 7.3.5 - juneau-rest-server.Instantiation.BasicRestServletGroup -->
 
 <!-- ==================================================================================================== -->
 
-<h4 class='topic ' onclick='toggle(this)'><a href='#juneau-rest-server.Instantiation.ResourceResolvers' id='juneau-rest-server.Instantiation.ResourceResolvers'>7.3.5 - Resource Resolvers</a></h4>
-<div class='topic'><!-- START: 7.3.5 - juneau-rest-server.Instantiation.ResourceResolvers -->
+<h4 class='topic new' onclick='toggle(this)'><a href='#juneau-rest-server.Instantiation.BasicRestGroup' id='juneau-rest-server.Instantiation.BasicRestGroup'>7.3.6 - BasicRestGroup</a></h4>
+<div class='topic'><!-- START: 7.3.6 - juneau-rest-server.Instantiation.BasicRestGroup -->
+<p>
+	The {@link org.apache.juneau.rest.BasicRestGroup} class is identical to the {@link org.apache.juneau.BasicRestServletGroup} class except that
+	it does not extend from <code>HttpServlet</code>.
+	It defines the exact same set of serializers, parsers, etc., but it cannot be deployed as a top-level
+	servlet.  It can however be used for child resources registered via the {@link org.apache.juneau.rest.annotation.RestResource#children() @RestResource(children)} 
+	annotation. 
+</p>
+<p class='bpcode w800'>
+	<jc>// The entire contents of the BasicRestGroup class.</jc>
+	
+	<jk>public class</jk> BasicRestGroup <jk>extends</jk> BasicRest {
+	
+		<ja>@RestMethod</ja>(name=<jsf>GET</jsf>, path=<js>"/"</js>, description=<js>"Child resources"</js>)
+		<jk>public</jk> ChildResourceDescriptions getChildren(RestRequest req) {
+			<jk>return new</jk> ChildResourceDescriptions(<jk>this</jk>, req);
+		}
+	}		
+</p>
+</div><!-- END: 7.3.6 - juneau-rest-server.Instantiation.BasicRestGroup -->
+
+<!-- ==================================================================================================== -->
+
+<h4 class='topic ' onclick='toggle(this)'><a href='#juneau-rest-server.Instantiation.ResourceResolvers' id='juneau-rest-server.Instantiation.ResourceResolvers'>7.3.7 - Resource Resolvers</a></h4>
+<div class='topic'><!-- START: 7.3.7 - juneau-rest-server.Instantiation.ResourceResolvers -->
 <p>
 	By default, you can add the {@link org.apache.juneau.rest.annotation.RestResource @RestResource}
 	to any class as long as it has one of the following constructors:
@@ -13594,12 +13717,12 @@
 <ul>
 	<li class='jf'>{@link org.apache.juneau.rest.RestContext#REST_resourceResolver}
 </ul>
-</div><!-- END: 7.3.5 - juneau-rest-server.Instantiation.ResourceResolvers -->
+</div><!-- END: 7.3.7 - juneau-rest-server.Instantiation.ResourceResolvers -->
 
 <!-- ==================================================================================================== -->
 
-<h4 class='topic ' onclick='toggle(this)'><a href='#juneau-rest-server.Instantiation.LifecycleHooks' id='juneau-rest-server.Instantiation.LifecycleHooks'>7.3.6 - Lifecycle Hooks</a></h4>
-<div class='topic'><!-- START: 7.3.6 - juneau-rest-server.Instantiation.LifecycleHooks -->
+<h4 class='topic ' onclick='toggle(this)'><a href='#juneau-rest-server.Instantiation.LifecycleHooks' id='juneau-rest-server.Instantiation.LifecycleHooks'>7.3.8 - Lifecycle Hooks</a></h4>
+<div class='topic'><!-- START: 7.3.8 - juneau-rest-server.Instantiation.LifecycleHooks -->
 <p>
 	Lifecycle hooks allow you to hook into lifecycle events of the servlet/resource creation and REST calls.
 </p>
@@ -13657,7 +13780,7 @@
 <ul>
 	<li class='ja'>{@link org.apache.juneau.rest.annotation.RestHook}
 </ul>
-</div><!-- END: 7.3.6 - juneau-rest-server.Instantiation.LifecycleHooks -->
+</div><!-- END: 7.3.8 - juneau-rest-server.Instantiation.LifecycleHooks -->
 </div><!-- END: 7.3 - juneau-rest-server.Instantiation -->
 
 <!-- ==================================================================================================== -->
@@ -21645,6 +21768,78 @@
 	 using Spring Boot and quickly deployable as an online application using Heroku.
 </p>
 </div><!-- END: 9.1 - juneau-rest-server-springboot.Overview -->
+
+<!-- ==================================================================================================== -->
+
+<h3 class='topic new' onclick='toggle(this)'><a href='#juneau-rest-server-springboot.ChildResources' id='juneau-rest-server-springboot.ChildResources'>9.2 - Child Resources</a></h3>
+<div class='topic'><!-- START: 9.2 - juneau-rest-server-springboot.ChildResources -->
+<p>
+	When using the <ja>@JuneauRestRoot</ja> annotation, servlet are given an instance of {@link org.apache.juneau.rest.springboot.SpringRestResourceResolver}.  
+	The resource resolver gets passed down through the children hierarchy, allowing child resources to be defined as injectable Spring beans.
+</p>
+<h5 class='figure'>Example:</h5>
+<p class='bpcode w800'>
+	<ja>@Configuration</ja>
+	<jk>public class</jk> AppConfiguration {
+	
+		<ja>@Bean @JuneauRestRoot</ja>
+		<jk>public</jk> RootResource getRootResource() {
+			<jk>return new</jk> RootResource();
+		}
+
+		<ja>@Bean</ja>
+		<jk>public</jk> ChildResource getChildResource() {
+			<jk>return new</jk> ChildResource();
+		}
+
+		<ja>@Bean</ja>
+		<jk>public</jk> GrandChildResource getGrandChildResource() {
+			<jk>return new</jk> GrandChildResource(); 
+		}
+	}
+</p>
+<p>
+	The root resource class must extend from <code>HttpServlet</code> so that it can be registered as a normal
+	servlet using the Spring Boot architecture.  The {@link org.apache.juneau.rest.BasicRestServletGroup} class is our router class
+	that extends from <code>HttpServlet</code>:
+</p>
+<p class='bpcode w800'>
+	<ja>@RestResource</ja>(
+		path=<js>"/root"</js>,
+		children={
+			ChildResource.<jk>class</jk>
+		}
+	)
+	<jk>public class</jk> RootResource <jk>extends</jk> BasicRestServletGroup {
+		<jc>// No code needed.</jc>
+	}
+</p>
+<p>
+	Because Spring Boot will automatically register any beans that extend from <code>HttpServlet</code>, we
+	DON'T want the child classes to extend from <code>HttpServlet</code>.  Instead, we extend from
+	{@link org.apache.juneau.rest.BasicRestGroup} and {@link org.apache.juneau.rest.BasicRest} instead:
+</p>
+
+<p class='bpcode w800'>
+	<ja>@RestResource</ja>(
+		path=<js>"/child"</js>,
+		children={
+			GrandChildResource.<jk>class</jk>
+		}
+	)
+	<jk>public class</jk> ChildResource <jk>extends</jk> BasicRestGroup {
+		<jc>// No code needed.</jc>
+	}
+</p>
+<p class='bpcode w800'>
+	<ja>@RestResource</ja>(
+		path=<js>"/grandchild"</js>
+	)
+	<jk>public class</jk> GrandChildResource <jk>extends</jk> BasicRest {
+		<jc>// Injectable bean</jc>
+	}
+</p>
+</div><!-- END: 9.2 - juneau-rest-server-springboot.ChildResources -->
 </div><!-- END: 9 - juneau-rest-server-springboot -->
 
 <!-- ==================================================================================================== -->
@@ -28990,7 +29185,7 @@
 <li><p><a class='doclink' href='#7.2.1'>7.2.1 (Oct 23, 2018)</a></p>
 <li><p><a class='doclink' href='#7.2.2'>7.2.2 (Nov 7, 2018)</a></p>
 <li><p><a class='doclink' href='#8.0.0'>8.0.0 (Jan 01, 2019)</a></p>
-<li><p><a class='doclink' href='#8.0.1'>8.0.0 (TBD)</a></p>
+<li><p><a class='doclink' href='#8.0.1'>8.0.1 (TBD)</a></p>
 </ul>
 
 	
@@ -35128,7 +35323,7 @@
 
 <!-- ==================================================================================================== -->
 
-<h3 class='topic' onclick='toggle(this)'><a href='#8.0.1' id='8.0.1'>8.0.0 (TBD)</a></h3>
+<h3 class='topic' onclick='toggle(this)'><a href='#8.0.1' id='8.0.1'>8.0.1 (TBD)</a></h3>
 <div class='topic'><!-- START: 8.0.1 -->
 <p>
 	TBD
@@ -35156,6 +35351,20 @@
 	<li>
 		
 </ul>
+
+<h5 class='topic w800'>juneau-rest-server</h5>
+<ul class='spaced-list'>
+	<li>
+		Added the following classes that provide the same support as the servlet classes but doesn't extend from <code>HttpServlet</code>.
+		<br>This fixes an issue where instances of {@link org.apache.juneau.rest.BasicRestServlet} are registered as top-level servlets even though
+		you don't want them to be.  
+		<ul>
+			<li class='jac'>{@link org.apache.juneau.rest.BasicRest} - Non-servlet equivalent to {@link org.apache.juneau.rest.BasicRestServlet}
+			<li class='jac'>{@link org.apache.juneau.rest.BasicRestGroup} - Non-servlet equivalent to {@link org.apache.juneau.rest.BasicRestServletGroup}
+			<li class='jac'>{@link org.apache.juneau.rest.BasicRestJena} - Non-servlet equivalent to {@link org.apache.juneau.rest.BasicRestServletJena}
+			<li class='jac'>{@link org.apache.juneau.rest.BasicRestJenaGroup} - Non-servlet equivalent to {@link org.apache.juneau.rest.BasicRestServletJenaGroup}
+		</ul>
+</ul>
 </div><!-- END: 8.0.1 -->
 
 </div>
diff --git a/juneau-doc/src/main/javadoc/resources/docs.txt b/juneau-doc/src/main/javadoc/resources/docs.txt
index a273bde..ff74611 100644
--- a/juneau-doc/src/main/javadoc/resources/docs.txt
+++ b/juneau-doc/src/main/javadoc/resources/docs.txt
@@ -256,6 +256,7 @@ juneau-rest-server = #juneau-rest-server, Overview > juneau-rest-server
 juneau-rest-server-jaxrs = #juneau-rest-server-jaxrs, Overview > juneau-rest-server-jaxrs
 juneau-rest-server-jaxrs.BaseProvider = #juneau-rest-server-jaxrs.BaseProvider, Overview > juneau-rest-server-jaxrs > Juneau JAX-RS Provider
 juneau-rest-server-springboot = #juneau-rest-server-springboot, Overview > juneau-rest-server-springboot
+juneau-rest-server-springboot.ChildResources = #juneau-rest-server-springboot.ChildResources, Overview > juneau-rest-server-springboot > Child Resources
 juneau-rest-server-springboot.Overview = #juneau-rest-server-springboot.Overview, Overview > juneau-rest-server-springboot > Overview
 juneau-rest-server.BuiltInParameters = #juneau-rest-server.BuiltInParameters, Overview > juneau-rest-server > Built-in Parameters
 juneau-rest-server.ClassHierarchy = #juneau-rest-server.ClassHierarchy, Overview > juneau-rest-server > Class Hierarchy
@@ -291,12 +292,14 @@ juneau-rest-server.HttpPartAnnotations.ResponseStatus = #juneau-rest-server.Http
 juneau-rest-server.HttpStatusCodes = #juneau-rest-server.HttpStatusCodes, Overview > juneau-rest-server > HTTP Status Codes
 juneau-rest-server.Injection = #juneau-rest-server.Injection, Overview > juneau-rest-server > Using with Spring and Injection frameworks
 juneau-rest-server.Instantiation = #juneau-rest-server.Instantiation, Overview > juneau-rest-server > Instantiation
+juneau-rest-server.Instantiation.BasicRest = #juneau-rest-server.Instantiation.BasicRest, Overview > juneau-rest-server > Instantiation > BasicRest
+juneau-rest-server.Instantiation.BasicRestGroup = #juneau-rest-server.Instantiation.BasicRestGroup, Overview > juneau-rest-server > Instantiation > BasicRestGroup
 juneau-rest-server.Instantiation.BasicRestServlet = #juneau-rest-server.Instantiation.BasicRestServlet, Overview > juneau-rest-server > Instantiation > BasicRestServlet
+juneau-rest-server.Instantiation.BasicRestServletGroup = #juneau-rest-server.Instantiation.BasicRestServletGroup, Overview > juneau-rest-server > Instantiation > BasicRestServletGroup
 juneau-rest-server.Instantiation.Children = #juneau-rest-server.Instantiation.Children, Overview > juneau-rest-server > Instantiation > Children
 juneau-rest-server.Instantiation.LifecycleHooks = #juneau-rest-server.Instantiation.LifecycleHooks, Overview > juneau-rest-server > Instantiation > Lifecycle Hooks
 juneau-rest-server.Instantiation.ResourceResolvers = #juneau-rest-server.Instantiation.ResourceResolvers, Overview > juneau-rest-server > Instantiation > Resource Resolvers
 juneau-rest-server.Instantiation.RestServlet = #juneau-rest-server.Instantiation.RestServlet, Overview > juneau-rest-server > Instantiation > RestServlet
-juneau-rest-server.Instantiation.RouterPages = #juneau-rest-server.Instantiation.RouterPages, Overview > juneau-rest-server > Instantiation > Router Pages
 juneau-rest-server.LoggingAndErrorHandling = #juneau-rest-server.LoggingAndErrorHandling, Overview > juneau-rest-server > Logging and Error Handling
 juneau-rest-server.Messages = #juneau-rest-server.Messages, Overview > juneau-rest-server > Messages
 juneau-rest-server.OpenApiSchemaPartParsing = #juneau-rest-server.OpenApiSchemaPartParsing, Overview > juneau-rest-server > OpenAPI Schema Part Parsing
diff --git a/juneau-doc/src/main/javadoc/resources/fragments/toc.html b/juneau-doc/src/main/javadoc/resources/fragments/toc.html
index 83381f0..23f5772 100644
--- a/juneau-doc/src/main/javadoc/resources/fragments/toc.html
+++ b/juneau-doc/src/main/javadoc/resources/fragments/toc.html
@@ -196,13 +196,15 @@
 	<li><p class='toc2'><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server'>juneau-rest-server</a></p>
 	<ol>
 		<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.HelloWorldExample'>Hello World Example</a></p>
-		<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.ClassHierarchy'>Class Hierarchy</a></p>
+		<li><p class='updated'><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.ClassHierarchy'>Class Hierarchy</a></p>
 		<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.Instantiation'>Instantiation</a></p>
 		<ol>
 			<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.Instantiation.RestServlet'>RestServlet</a></p>
 			<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.Instantiation.BasicRestServlet'>BasicRestServlet</a></p>
+			<li><p class='new'><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.Instantiation.BasicRest'>BasicRest</a></p>
 			<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.Instantiation.Children'>Children</a></p>
-			<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.Instantiation.RouterPages'>Router Pages</a></p>
+			<li><p class='updated'><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.Instantiation.BasicRestServletGroup'>BasicRestServletGroup</a></p>
+			<li><p class='new'><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.Instantiation.BasicRestGroup'>BasicRestGroup</a></p>
 			<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.Instantiation.ResourceResolvers'>Resource Resolvers</a></p>
 			<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server.Instantiation.LifecycleHooks'>Lifecycle Hooks</a></p>
 		</ol>
@@ -306,6 +308,7 @@
 	<li><p class='toc2'><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server-springboot'>juneau-rest-server-springboot</a></p>
 	<ol>
 		<li><p class=''><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server-springboot.Overview'>Overview</a></p>
+		<li><p class='new'><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-server-springboot.ChildResources'>Child Resources</a></p>
 	</ol>
 	<li><p class='toc2'><a class='doclink' href='{OVERVIEW_URL}#juneau-rest-client'>juneau-rest-client</a></p>
 	<ol>
diff --git a/juneau-examples/juneau-examples-rest/src/main/java/org/apache/juneau/examples/rest/RequestEchoResource.java b/juneau-examples/juneau-examples-rest/src/main/java/org/apache/juneau/examples/rest/RequestEchoResource.java
index cfb6fcd..b665542 100644
--- a/juneau-examples/juneau-examples-rest/src/main/java/org/apache/juneau/examples/rest/RequestEchoResource.java
+++ b/juneau-examples/juneau-examples-rest/src/main/java/org/apache/juneau/examples/rest/RequestEchoResource.java
@@ -78,8 +78,7 @@ import org.apache.juneau.transforms.*;
 		externalDocs=@ExternalDocs(description="Apache Juneau",url="http://juneau.apache.org")
 	)
 )
-public class RequestEchoResource extends BasicRestServlet {
-	private static final long serialVersionUID = 1L;
+public class RequestEchoResource extends BasicRest {
 
 	/** GET request handler */
 	@RestMethod(name="*", path="/*", converters={Traversable.class,Queryable.class}, summary="Serializes the incoming HttpServletRequest object.")
diff --git a/juneau-examples/juneau-examples-rest/src/main/java/org/apache/juneau/examples/rest/petstore/rest/PetStoreResource.java b/juneau-examples/juneau-examples-rest/src/main/java/org/apache/juneau/examples/rest/petstore/rest/PetStoreResource.java
index dda1bc7..2d57fc7 100644
--- a/juneau-examples/juneau-examples-rest/src/main/java/org/apache/juneau/examples/rest/petstore/rest/PetStoreResource.java
+++ b/juneau-examples/juneau-examples-rest/src/main/java/org/apache/juneau/examples/rest/petstore/rest/PetStoreResource.java
@@ -135,7 +135,7 @@ import org.apache.juneau.rest.converters.*;
 		PhotosResource.class
 	}
 )
-public class PetStoreResource extends BasicRestServletJena implements PetStore {
+public class PetStoreResource extends BasicRestJena implements PetStore {
 	private static final long serialVersionUID = 1L;
 
 	private PetStoreService store;
diff --git a/juneau-rest/juneau-rest-server-rdf/src/main/java/org/apache/juneau/rest/BasicRestJena.java b/juneau-rest/juneau-rest-server-rdf/src/main/java/org/apache/juneau/rest/BasicRestJena.java
new file mode 100644
index 0000000..e071e06
--- /dev/null
+++ b/juneau-rest/juneau-rest-server-rdf/src/main/java/org/apache/juneau/rest/BasicRestJena.java
@@ -0,0 +1,41 @@
+// ***************************************************************************************************************************
+// * 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.                                              *
+// ***************************************************************************************************************************
+package org.apache.juneau.rest;
+
+import javax.servlet.http.HttpServlet;
+
+import org.apache.juneau.jena.*;
+import org.apache.juneau.rest.annotation.*;
+
+/**
+ * Identical to {@link BasicRestServletJena} but doesn't extend from {@link HttpServlet}
+ */
+@SuppressWarnings("serial")
+@RestResource(
+	serializers={
+		Inherit.class,
+		RdfXmlSerializer.class,
+		RdfXmlAbbrevSerializer.class,
+		TurtleSerializer.class,
+		NTripleSerializer.class,
+		N3Serializer.class
+	},
+	parsers={
+		Inherit.class,
+		RdfXmlParser.class,
+		TurtleParser.class,
+		NTripleParser.class,
+		N3Parser.class
+	}
+)
+public abstract class BasicRestJena extends BasicRestServlet {}
diff --git a/juneau-rest/juneau-rest-server-rdf/src/main/java/org/apache/juneau/rest/BasicRestJenaGroup.java b/juneau-rest/juneau-rest-server-rdf/src/main/java/org/apache/juneau/rest/BasicRestJenaGroup.java
new file mode 100644
index 0000000..2776ff3
--- /dev/null
+++ b/juneau-rest/juneau-rest-server-rdf/src/main/java/org/apache/juneau/rest/BasicRestJenaGroup.java
@@ -0,0 +1,39 @@
+// ***************************************************************************************************************************
+// * 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.                                              *
+// ***************************************************************************************************************************
+package org.apache.juneau.rest;
+
+import org.apache.juneau.jena.*;
+import org.apache.juneau.rest.annotation.*;
+
+/**
+ * Identical to {@link BasicRestServletJenaGroup} but doesn't extend from {@link HttpServlet}
+ */
+@SuppressWarnings("serial")
+@RestResource(
+	serializers={
+		Inherit.class,
+		RdfXmlSerializer.class,
+		RdfXmlAbbrevSerializer.class,
+		TurtleSerializer.class,
+		NTripleSerializer.class,
+		N3Serializer.class
+	},
+	parsers={
+		Inherit.class,
+		RdfXmlParser.class,
+		TurtleParser.class,
+		NTripleParser.class,
+		N3Parser.class
+	}
+)
+public abstract class BasicRestJenaGroup extends BasicRestServletGroup {}
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/BasicRest.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/BasicRest.java
new file mode 100644
index 0000000..18130b4
--- /dev/null
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/BasicRest.java
@@ -0,0 +1,101 @@
+// ***************************************************************************************************************************
+// * 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.                                              *
+// ***************************************************************************************************************************
+package org.apache.juneau.rest;
+
+import static org.apache.juneau.http.HttpMethodName.*;
+import static org.apache.juneau.jsonschema.JsonSchemaGenerator.*;
+
+import javax.servlet.http.*;
+
+import org.apache.juneau.dto.swagger.*;
+import org.apache.juneau.dto.swagger.ui.*;
+import org.apache.juneau.rest.annotation.*;
+
+/**
+ * Identical to {@link BasicRestServlet} but doesn't extend from {@link HttpServlet}
+ *
+ * <h5 class='section'>See Also:</h5>
+ * <ul>
+ * 	<li class='link'>{@doc juneau-rest-server.Instantiation.BasicRest}
+ * </ul>
+ */
+@RestResource(
+
+	// Allow OPTIONS requests to be simulated using ?method=OPTIONS query parameter.
+	allowedMethodParams="OPTIONS",
+
+	// HTML-page specific settings.
+	htmldoc=@HtmlDoc(
+		// Basic page navigation links.
+		navlinks={
+			"up: request:/..",
+			"options: servlet:/?method=OPTIONS"
+		}
+	)
+)
+public abstract class BasicRest implements BasicRestConfig {
+
+	/**
+	 * [OPTIONS /*] - Show resource options.
+	 *
+	 * @param req The HTTP request.
+	 * @return A bean containing the contents for the OPTIONS page.
+	 */
+	@RestMethod(name=OPTIONS, path="/*",
+
+		summary="Swagger documentation",
+		description="Swagger documentation for this resource.",
+
+		htmldoc=@HtmlDoc(
+			// Override the nav links for the swagger page.
+			navlinks={
+				"back: servlet:/",
+				"json: servlet:/?method=OPTIONS&Accept=text/json&plainText=true"
+			},
+			// Never show aside contents of page inherited from class.
+			aside="NONE"
+		),
+
+		// POJO swaps to apply to all serializers/parsers on this method.
+		pojoSwaps={
+			// Use the SwaggerUI swap when rendering Swagger beans.
+			// This is a per-media-type swap that only applies to text/html requests.
+			SwaggerUI.class
+		},
+
+		// Properties to apply to all serializers/parsers and REST-specific API objects on this method.
+		properties={
+			// Add descriptions to the following types when not specified:
+			@Property(name=JSONSCHEMA_addDescriptionsTo, value="bean,collection,array,map,enum"),
+
+			// Add x-example to the following types:
+			@Property(name=JSONSCHEMA_addExamplesTo, value="bean,collection,array,map"),
+
+			// Don't generate schema information on the Swagger bean itself or HTML beans.
+			@Property(name=JSONSCHEMA_ignoreTypes, value="Swagger,org.apache.juneau.dto.html5.*")
+		},
+
+		// Shortcut for boolean properties.
+		flags={
+			// Use $ref references for bean definitions to reduce duplication in Swagger.
+			JSONSCHEMA_useBeanDefs,
+
+			// When parsing generated beans, ignore unknown properties that may only exist as getters and not setters.
+			BEAN_ignoreUnknownBeanProperties
+		}
+	)
+	public Swagger getOptions(RestRequest req) {
+		// Localized Swagger for this resource is available through the RestRequest object.
+		return req.getSwagger();
+	}
+}
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/BasicRestGroup.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/BasicRestGroup.java
new file mode 100644
index 0000000..beca3fb
--- /dev/null
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/BasicRestGroup.java
@@ -0,0 +1,45 @@
+// ***************************************************************************************************************************
+// * 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.                                              *
+// ***************************************************************************************************************************
+package org.apache.juneau.rest;
+
+import static org.apache.juneau.http.HttpMethodName.*;
+
+import javax.servlet.http.*;
+
+import org.apache.juneau.rest.annotation.*;
+import org.apache.juneau.rest.helper.*;
+
+/**
+ * Identical to {@link BasicRestServletGroup} but doesn't extend from {@link HttpServlet}
+ *
+ * <h5 class='section'>See Also:</h5>
+ * <ul>
+ * 	<li class='link'>{@doc juneau-rest-server.Instantiation.BasicRestGroup}
+ * </ul>
+ */
+@RestResource
+public abstract class BasicRestGroup extends BasicRest {
+
+	/**
+	 * [GET /] - Get child resources.
+	 *
+	 * @param req The HTTP request.
+	 * @return The bean containing links to the child resources.
+	 * @throws Exception
+	 */
+	@RestMethod(name=GET, path="/", summary="Navigation page")
+	public ChildResourceDescriptions getChildren(RestRequest req) throws Exception {
+		return new ChildResourceDescriptions(req);
+	}
+}
+


Mime
View raw message