Class App
java.lang.Object
org.apache.juneau.examples.rest.springboot.App
Entry point for Examples REST application when deployed as a Spring Boot application.
See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionOptionally return an injectable message provider for theHelloWorldResource
class.Optionally return theHelloWorldResource
object as an injectable bean.Our root REST bean.org.springframework.boot.web.servlet.ServletRegistrationBean<jakarta.servlet.Servlet>
getRootServlet
(RootResources rootResources) static void
Entry point method.
-
Constructor Details
-
App
public App()
-
-
Method Details
-
main
Entry point method.- Parameters:
args
- Command-line arguments.
-
getRootResources
Our root REST bean.Note that this must extend from
SpringRestServlet
so that child resources can be resolved as Spring beans.All REST objects are attached to this bean using the
Rest.children()
annotation.- Returns:
- The root resources REST bean.
-
getHelloWorldResource
Optionally return theHelloWorldResource
object as an injectable bean.- Returns:
- The hello-world REST bean.
-
getHelloWorldMessageProvider
Optionally return an injectable message provider for theHelloWorldResource
class.- Returns:
- The message provider for the hello-world REST bean.
-
getRootServlet
@Bean public org.springframework.boot.web.servlet.ServletRegistrationBean<jakarta.servlet.Servlet> getRootServlet(RootResources rootResources) - Parameters:
rootResources
- The root REST resource servlet- Returns:
- The servlet registration mapped to "/*".
-