java.lang.Object
org.apache.juneau.microservice.springboot.template.App

@SpringBootApplication @Controller public class App extends Object
Entry point for Examples REST application when deployed as a Spring Boot application.
See Also:
  • Constructor Details

    • App

      public App()
  • Method Details

    • main

      public static void main(String[] args)
      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 the HelloWorldResource object as an injectable bean.
      Returns:
      The hello-world REST bean.
    • getHelloWorldMessageProvider

      Optionally return an injectable message provider for the HelloWorldResource 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 "/*".
    • registration

      @Bean public org.springframework.boot.web.servlet.FilterRegistrationBean<org.springframework.web.filter.HiddenHttpMethodFilter> registration(org.springframework.web.filter.HiddenHttpMethodFilter filter)
      We want to be able to consume url-encoded-form-post bodies, but HiddenHttpMethodFilter triggers the HTTP body to be consumed. So disable it.
      Parameters:
      filter - The filter.
      Returns:
      Filter registration bean.