You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@juneau.apache.org by ja...@apache.org on 2018/12/12 16:59:24 UTC
[juneau] branch master updated: Rename @JuneauRest to
@JuneauRestRoot and Javadocs.
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 c55c1df Rename @JuneauRest to @JuneauRestRoot and Javadocs.
c55c1df is described below
commit c55c1df1a3a5a519942b9581e3d6408c0385ef2a
Author: JamesBognar <ja...@apache.org>
AuthorDate: Wed Dec 12 11:59:08 2018 -0500
Rename @JuneauRest to @JuneauRestRoot and Javadocs.
---
.../01.Overview.html | 12 +++++-----
.../01.Installing.html | 8 ++++---
.../02.Running.html | 20 ++++++++++++-----
.../03.Building.html | 14 ++++++++++--
...croservice-springboot-template.Installing.2.png | Bin 103957 -> 92377 bytes
...croservice-springboot-template.Installing.2.png | Bin 103957 -> 92377 bytes
juneau-doc/src/main/javadoc/overview.html | 25 ++++++++++++---------
.../src/main/javadoc/resources/fragments/toc.html | 2 +-
.../juneau/examples/rest/springboot/App.java | 2 +-
.../juneau-microservice-jetty-template/pom.xml | 1 +
.../build-overlay/.classpath | 3 +--
.../build-overlay/pom.xml | 12 ++++++++++
.../pom.xml | 1 +
.../org/apache/juneau/microservice/sample/App.java | 2 +-
.../juneau/microservice/sample/RootResources.java | 2 +-
.../rest/springboot/JuneauRestInitializer.java | 2 +-
.../rest/springboot/JuneauRestPostProcessor.java | 14 ++++++------
.../{JuneauRest.java => JuneauRestRoot.java} | 2 +-
18 files changed, 80 insertions(+), 42 deletions(-)
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 76d1cd4..5e1d3ae 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
@@ -19,13 +19,13 @@
The Juneau integration component for Spring Boot consists of the following classes:
</p>
<ul class='doctree'>
- <li class='ja'>{@link oajr.springboot.annotation.JuneauRest}
+ <li class='ja'>{@link oajr.springboot.annotation.JuneauRestRoot}
<li class='jc'>{@link oajr.springboot.JuneauRestInitializer}
<li class='jc'>{@link oajr.springboot.SpringRestResourceResolver}
</ul>
<p>
A typical Spring Boot application can use the {@link oajr.springboot.JuneauRestInitializer} to find
- and register Juneau REST servlets via the {@link oajr.springboot.annotation.JuneauRest} annotation.
+ and register Juneau REST servlets via the {@link oajr.springboot.annotation.JuneauRestRoot} annotation.
</p>
<h5 class='figure'>Example:</h5>
<p class='bpcode w800'>
@@ -40,23 +40,23 @@
}
<jd>/** Our root resource */</jd>
- <ja>@Bean @JuneauRest</ja>
+ <ja>@Bean @JuneauRestRoot</ja>
<jk>public</jk> RootResource getRootResource() {
<jk>return new</jk> RootResource(); <jc>// A subclass of RestServlet.</jc>
}
}
</p>
<p>
- The initializer will search for Spring beans annotated with the <ja>@JuneauRest</ja> annotation identifying it
+ The initializer will search for Spring beans annotated with the <ja>@JuneauRestRoot</ja> annotation identifying it
as a top-level servlet to be deployed in the Spring Boot web container.
</p>
<p>
- Another option is to use the <ja>@JuneauRest</ja> annotation on your Spring Boot source class like so:
+ Another option is to use the <ja>@JuneauRestRoot</ja> annotation on your Spring Boot source class like so:
</p>
<p class='bpcode w800'>
<ja>@SpringBootApplication</ja>
<ja>@Controller</ja>
- <ja>@JuneauRest</ja>(servlets=RootResource.<jk>class</jk>)
+ <ja>@JuneauRestRoot</ja>(servlets=RootResource.<jk>class</jk>)
<jk>public class</jk> App {
<jk>public static void</jk> main(String[] args) {
diff --git a/juneau-doc/docs/Topics/14.juneau-microservice-springboot-template/01.Installing.html b/juneau-doc/docs/Topics/14.juneau-microservice-springboot-template/01.Installing.html
index 6191c24..c83de65 100644
--- a/juneau-doc/docs/Topics/14.juneau-microservice-springboot-template/01.Installing.html
+++ b/juneau-doc/docs/Topics/14.juneau-microservice-springboot-template/01.Installing.html
@@ -13,7 +13,7 @@
***************************************************************************************************************************/
-->
-{todo} Installing in Eclipse
+{new} Installing in Eclipse
<p>
Follow these instructions to create a new template project in Eclipse.
@@ -38,7 +38,9 @@
<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.
+ <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 oaj.microservice.springboot.annotation.JuneauRestRoot @JuneauRestRoot}
<br><br>
<p class='bcode w800'>
<ja>@SpringBootApplication</ja>
@@ -51,7 +53,7 @@
.run(args);
}
- <ja>@Bean @JuneauRest</ja>
+ <ja>@Bean @JuneauRestRoot</ja>
<jk>public</jk> RootResources getRootResources() {
<jk>return new</jk> RootResources();
}
diff --git a/juneau-doc/docs/Topics/14.juneau-microservice-springboot-template/02.Running.html b/juneau-doc/docs/Topics/14.juneau-microservice-springboot-template/02.Running.html
index 246437f..08912e1 100644
--- a/juneau-doc/docs/Topics/14.juneau-microservice-springboot-template/02.Running.html
+++ b/juneau-doc/docs/Topics/14.juneau-microservice-springboot-template/02.Running.html
@@ -13,7 +13,7 @@
***************************************************************************************************************************/
-->
-{todo} Running in Eclipse
+{new} Running in Eclipse
<p>
The <l>my-microservice.launch</l> file is already provided to allow you to quickly start
@@ -24,16 +24,26 @@
<br>In your console view, you should see the following output:
</p>
<p class='bpcode w800'>
- TODO
+ . ____ _ __ _ _
+ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
+ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
+ \\/ ___)| |_)| | | | | || (_| | ) ) ) )
+ ' |____| .__|_| |_|_| |_\__, | / / / /
+ =========|_|==============|___/=/_/_/_/
+ :: 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>.
+ Now open your browser and point to <l>http://localhost:8080</l>.
You should see the following:
</p>
<p class='bpcode w400'>
- http://localhost:5000
+ http://localhost:8080
</p>
<img class='bordered w400' src='doc-files/juneau-microservice-springboot-template.Running.1.png'>
<p>
- You have started a REST interface on port 5000.
+ You have started a REST interface on port 8080.
</p>
diff --git a/juneau-doc/docs/Topics/14.juneau-microservice-springboot-template/03.Building.html b/juneau-doc/docs/Topics/14.juneau-microservice-springboot-template/03.Building.html
index 675b46e..bca2bc6 100644
--- a/juneau-doc/docs/Topics/14.juneau-microservice-springboot-template/03.Building.html
+++ b/juneau-doc/docs/Topics/14.juneau-microservice-springboot-template/03.Building.html
@@ -13,7 +13,7 @@
***************************************************************************************************************************/
-->
-{todo} 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
@@ -41,5 +41,15 @@
You should see the following console output:
</p>
<p class='bpcode w800'>
- TODO
+ . ____ _ __ _ _
+ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
+ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
+ \\/ ___)| |_)| | | | | || (_| | ) ) ) )
+ ' |____| .__|_| |_|_| |_\__, | / / / /
+ =========|_|==============|___/=/_/_/_/
+ :: 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>
diff --git a/juneau-doc/docs/Topics/14.juneau-microservice-springboot-template/doc-files/juneau-microservice-springboot-template.Installing.2.png b/juneau-doc/docs/Topics/14.juneau-microservice-springboot-template/doc-files/juneau-microservice-springboot-template.Installing.2.png
index 6e81fa5..c3a681a 100644
Binary files a/juneau-doc/docs/Topics/14.juneau-microservice-springboot-template/doc-files/juneau-microservice-springboot-template.Installing.2.png and b/juneau-doc/docs/Topics/14.juneau-microservice-springboot-template/doc-files/juneau-microservice-springboot-template.Installing.2.png 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
index 6e81fa5..c3a681a 100644
Binary files a/juneau-doc/src/main/javadoc/doc-files/juneau-microservice-springboot-template.Installing.2.png and b/juneau-doc/src/main/javadoc/doc-files/juneau-microservice-springboot-template.Installing.2.png differ
diff --git a/juneau-doc/src/main/javadoc/overview.html b/juneau-doc/src/main/javadoc/overview.html
index f721cc4..adbe7b6 100644
--- a/juneau-doc/src/main/javadoc/overview.html
+++ b/juneau-doc/src/main/javadoc/overview.html
@@ -449,7 +449,7 @@
</ol>
<li><p class='todo'><a class='doclink' href='#juneau-examples-rest-springboot'>juneau-examples-rest-springboot</a></p>
<ol>
- <li><p class='new'><a class='doclink' href='#juneau-examples-rest-springboot.Classes'>Classes</a></p>
+ <li><p class='todo'><a class='doclink' href='#juneau-examples-rest-springboot.Classes'>Classes</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>
@@ -21408,13 +21408,13 @@
The Juneau integration component for Spring Boot consists of the following classes:
</p>
<ul class='doctree'>
- <li class='ja'>{@link org.apache.juneau.rest.springboot.annotation.JuneauRest}
+ <li class='ja'>{@link org.apache.juneau.rest.springboot.annotation.JuneauRestRoot}
<li class='jc'>{@link org.apache.juneau.rest.springboot.JuneauRestInitializer}
<li class='jc'>{@link org.apache.juneau.rest.springboot.SpringRestResourceResolver}
</ul>
<p>
A typical Spring Boot application can use the {@link org.apache.juneau.rest.springboot.JuneauRestInitializer} to find
- and register Juneau REST servlets via the {@link org.apache.juneau.rest.springboot.annotation.JuneauRest} annotation.
+ and register Juneau REST servlets via the {@link org.apache.juneau.rest.springboot.annotation.JuneauRestRoot} annotation.
</p>
<h5 class='figure'>Example:</h5>
<p class='bpcode w800'>
@@ -21429,23 +21429,23 @@
}
<jd>/** Our root resource */</jd>
- <ja>@Bean @JuneauRest</ja>
+ <ja>@Bean @JuneauRestRoot</ja>
<jk>public</jk> RootResource getRootResource() {
<jk>return new</jk> RootResource(); <jc>// A subclass of RestServlet.</jc>
}
}
</p>
<p>
- The initializer will search for Spring beans annotated with the <ja>@JuneauRest</ja> annotation identifying it
+ The initializer will search for Spring beans annotated with the <ja>@JuneauRestRoot</ja> annotation identifying it
as a top-level servlet to be deployed in the Spring Boot web container.
</p>
<p>
- Another option is to use the <ja>@JuneauRest</ja> annotation on your Spring Boot source class like so:
+ Another option is to use the <ja>@JuneauRestRoot</ja> annotation on your Spring Boot source class like so:
</p>
<p class='bpcode w800'>
<ja>@SpringBootApplication</ja>
<ja>@Controller</ja>
- <ja>@JuneauRest</ja>(servlets=RootResource.<jk>class</jk>)
+ <ja>@JuneauRestRoot</ja>(servlets=RootResource.<jk>class</jk>)
<jk>public class</jk> App {
<jk>public static void</jk> main(String[] args) {
@@ -25496,7 +25496,9 @@
<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.
+ <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.microservice.springboot.annotation.JuneauRestRoot @JuneauRestRoot}
<br><br>
<p class='bcode w800'>
<ja>@SpringBootApplication</ja>
@@ -25509,7 +25511,7 @@
.run(args);
}
- <ja>@Bean @JuneauRest</ja>
+ <ja>@Bean @JuneauRestRoot</ja>
<jk>public</jk> RootResources getRootResources() {
<jk>return new</jk> RootResources();
}
@@ -25545,10 +25547,11 @@
}
</p>
<li>
- <l>my-microservice.cfg</l> - The external configuration file.
+ <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>#=======================================================================================================================
@@ -27864,7 +27867,7 @@
<!-- ==================================================================================================== -->
-<h3 class='topic new' onclick='toggle(this)'><a href='#juneau-examples-rest-springboot.Classes' id='juneau-examples-rest-springboot.Classes'>18.1 - Classes</a></h3>
+<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>
diff --git a/juneau-doc/src/main/javadoc/resources/fragments/toc.html b/juneau-doc/src/main/javadoc/resources/fragments/toc.html
index 7398437..206ab16 100644
--- a/juneau-doc/src/main/javadoc/resources/fragments/toc.html
+++ b/juneau-doc/src/main/javadoc/resources/fragments/toc.html
@@ -392,7 +392,7 @@
</ol>
<li><p class='todo'><a class='doclink' href='{OVERVIEW_URL}#juneau-examples-rest-springboot'>juneau-examples-rest-springboot</a></p>
<ol>
- <li><p class='new'><a class='doclink' href='{OVERVIEW_URL}#juneau-examples-rest-springboot.Classes'>Classes</a></p>
+ <li><p class='todo'><a class='doclink' href='{OVERVIEW_URL}#juneau-examples-rest-springboot.Classes'>Classes</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-springboot/src/main/java/org/apache/juneau/examples/rest/springboot/App.java b/juneau-examples/juneau-examples-rest-springboot/src/main/java/org/apache/juneau/examples/rest/springboot/App.java
index 9f3f602..2c23a3e 100644
--- a/juneau-examples/juneau-examples-rest-springboot/src/main/java/org/apache/juneau/examples/rest/springboot/App.java
+++ b/juneau-examples/juneau-examples-rest-springboot/src/main/java/org/apache/juneau/examples/rest/springboot/App.java
@@ -36,7 +36,7 @@ public class App {
/**
* Our root resource.
*/
- @Bean @JuneauRest
+ @Bean @JuneauRestRoot
public RootResources getRootResources() {
return new RootResources();
}
diff --git a/juneau-microservice/juneau-microservice-jetty-template/pom.xml b/juneau-microservice/juneau-microservice-jetty-template/pom.xml
index 2709fa1..4dca41c 100644
--- a/juneau-microservice/juneau-microservice-jetty-template/pom.xml
+++ b/juneau-microservice/juneau-microservice-jetty-template/pom.xml
@@ -72,6 +72,7 @@
<descriptors>
<descriptor>src/assembly/bin.xml</descriptor>
</descriptors>
+ <escapeString>\</escapeString>
</configuration>
</execution>
</executions>
diff --git a/juneau-microservice/juneau-microservice-springboot-template/build-overlay/.classpath b/juneau-microservice/juneau-microservice-springboot-template/build-overlay/.classpath
index af1430b..4975bcf 100755
--- a/juneau-microservice/juneau-microservice-springboot-template/build-overlay/.classpath
+++ b/juneau-microservice/juneau-microservice-springboot-template/build-overlay/.classpath
@@ -6,9 +6,8 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
- <classpathentry kind="src" output="target/test-classes" path="src/test/java">
+ <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes>
- <attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
diff --git a/juneau-microservice/juneau-microservice-springboot-template/build-overlay/pom.xml b/juneau-microservice/juneau-microservice-springboot-template/build-overlay/pom.xml
index 1d71e52..95e0cfa 100644
--- a/juneau-microservice/juneau-microservice-springboot-template/build-overlay/pom.xml
+++ b/juneau-microservice/juneau-microservice-springboot-template/build-overlay/pom.xml
@@ -127,6 +127,18 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifest>
+ <mainClass>org.apache.juneau.microservice.sample.App
+ </mainClass>
+ </manifest>
+ </archive>
+ </configuration>
+ </plugin>
</plugins>
<resources>
<resource>
diff --git a/juneau-microservice/juneau-microservice-springboot-template/pom.xml b/juneau-microservice/juneau-microservice-springboot-template/pom.xml
index 57431b8..ee13663 100644
--- a/juneau-microservice/juneau-microservice-springboot-template/pom.xml
+++ b/juneau-microservice/juneau-microservice-springboot-template/pom.xml
@@ -77,6 +77,7 @@
<descriptors>
<descriptor>src/assembly/bin.xml</descriptor>
</descriptors>
+ <escapeString>\</escapeString>
</configuration>
</execution>
</executions>
diff --git a/juneau-microservice/juneau-microservice-springboot-template/src/main/java/org/apache/juneau/microservice/sample/App.java b/juneau-microservice/juneau-microservice-springboot-template/src/main/java/org/apache/juneau/microservice/sample/App.java
index 58adf18..e9ff11d 100644
--- a/juneau-microservice/juneau-microservice-springboot-template/src/main/java/org/apache/juneau/microservice/sample/App.java
+++ b/juneau-microservice/juneau-microservice-springboot-template/src/main/java/org/apache/juneau/microservice/sample/App.java
@@ -40,7 +40,7 @@ public class App {
/**
* @return Our root resource.
*/
- @Bean @JuneauRest
+ @Bean @JuneauRestRoot
public RootResources getRootResources() {
return new RootResources();
}
diff --git a/juneau-microservice/juneau-microservice-springboot-template/src/main/java/org/apache/juneau/microservice/sample/RootResources.java b/juneau-microservice/juneau-microservice-springboot-template/src/main/java/org/apache/juneau/microservice/sample/RootResources.java
index c96b89d..9de1714 100755
--- a/juneau-microservice/juneau-microservice-springboot-template/src/main/java/org/apache/juneau/microservice/sample/RootResources.java
+++ b/juneau-microservice/juneau-microservice-springboot-template/src/main/java/org/apache/juneau/microservice/sample/RootResources.java
@@ -24,7 +24,7 @@ import org.apache.juneau.rest.widget.ThemeMenuItem;
* Root microservice page.
*/
@RestResource(
- path="/",
+ path="/*",
title="My Microservice",
description="Top-level resources page",
htmldoc=@HtmlDoc(
diff --git a/juneau-rest/juneau-rest-server-springboot/src/main/java/org/apache/juneau/rest/springboot/JuneauRestInitializer.java b/juneau-rest/juneau-rest-server-springboot/src/main/java/org/apache/juneau/rest/springboot/JuneauRestInitializer.java
index 5cdd6cf..2709401 100644
--- a/juneau-rest/juneau-rest-server-springboot/src/main/java/org/apache/juneau/rest/springboot/JuneauRestInitializer.java
+++ b/juneau-rest/juneau-rest-server-springboot/src/main/java/org/apache/juneau/rest/springboot/JuneauRestInitializer.java
@@ -20,7 +20,7 @@ import org.springframework.context.ConfigurableApplicationContext;
* Spring Boot context initializer for Juneau REST resources.
*
* <p>
- * Looks for the {@link JuneauRest} annotation on the Spring application class to automatically register Juneau REST resources.
+ * Looks for the {@link JuneauRestRoot} annotation on the Spring application class to automatically register Juneau REST resources.
*/
public class JuneauRestInitializer implements ApplicationContextInitializer<ConfigurableApplicationContext> {
diff --git a/juneau-rest/juneau-rest-server-springboot/src/main/java/org/apache/juneau/rest/springboot/JuneauRestPostProcessor.java b/juneau-rest/juneau-rest-server-springboot/src/main/java/org/apache/juneau/rest/springboot/JuneauRestPostProcessor.java
index 0070ee7..aa3a2fe 100644
--- a/juneau-rest/juneau-rest-server-springboot/src/main/java/org/apache/juneau/rest/springboot/JuneauRestPostProcessor.java
+++ b/juneau-rest/juneau-rest-server-springboot/src/main/java/org/apache/juneau/rest/springboot/JuneauRestPostProcessor.java
@@ -28,7 +28,7 @@ import java.util.*;
import javax.servlet.Servlet;
/**
- * Processes the {@link JuneauRest} annotation on the Spring application class and <ja>@Bean</ja> methods.
+ * Processes the {@link JuneauRestRoot} annotation on the Spring application class and <ja>@Bean</ja> methods.
*/
public class JuneauRestPostProcessor implements BeanDefinitionRegistryPostProcessor {
@@ -57,25 +57,25 @@ public class JuneauRestPostProcessor implements BeanDefinitionRegistryPostProces
try {
Map<String,RestServlet> m = new LinkedHashMap<>();
- // @JuneauRest on App class.
+ // @JuneauRestRoot on App class.
if (appClass != null) {
- JuneauRest a = appClass.getAnnotation(JuneauRest.class);
+ JuneauRestRoot a = appClass.getAnnotation(JuneauRestRoot.class);
if (a != null)
for (Class<? extends RestServlet> c : a.servlets())
m.put(c.getName(), c.newInstance());
}
- // @JuneauRest on classes.
- for (Map.Entry<String,Object> e : beanFactory.getBeansWithAnnotation(JuneauRest.class).entrySet())
+ // @JuneauRestRoot on classes.
+ for (Map.Entry<String,Object> e : beanFactory.getBeansWithAnnotation(JuneauRestRoot.class).entrySet())
if (e.getValue() instanceof RestServlet)
m.put(e.getKey(), (RestServlet) e.getValue());
- // @JuneauRest on @Bean method.
+ // @JuneauRestRoot on @Bean method.
for (String beanName : beanFactory.getBeanNamesForType(RestServlet.class)) {
BeanDefinition bd = beanFactory.getBeanDefinition(beanName);
if (bd.getSource() instanceof AnnotatedTypeMetadata) {
AnnotatedTypeMetadata metadata = (AnnotatedTypeMetadata) bd.getSource();
- if (metadata.isAnnotated(JuneauRest.class.getName()))
+ if (metadata.isAnnotated(JuneauRestRoot.class.getName()))
m.put(beanName, (RestServlet) beanFactory.getBean(beanName));
}
}
diff --git a/juneau-rest/juneau-rest-server-springboot/src/main/java/org/apache/juneau/rest/springboot/annotation/JuneauRest.java b/juneau-rest/juneau-rest-server-springboot/src/main/java/org/apache/juneau/rest/springboot/annotation/JuneauRestRoot.java
similarity index 98%
rename from juneau-rest/juneau-rest-server-springboot/src/main/java/org/apache/juneau/rest/springboot/annotation/JuneauRest.java
rename to juneau-rest/juneau-rest-server-springboot/src/main/java/org/apache/juneau/rest/springboot/annotation/JuneauRestRoot.java
index 775de44..ac1eac9 100644
--- a/juneau-rest/juneau-rest-server-springboot/src/main/java/org/apache/juneau/rest/springboot/annotation/JuneauRest.java
+++ b/juneau-rest/juneau-rest-server-springboot/src/main/java/org/apache/juneau/rest/springboot/annotation/JuneauRestRoot.java
@@ -36,7 +36,7 @@ import java.lang.annotation.*;
@Retention(RUNTIME)
@Documented
@Inherited
-public @interface JuneauRest {
+public @interface JuneauRestRoot {
/**
* Specifies one or more implementations of {@link RestServlet} to deploy as servlets.