Class RootResources

All Implemented Interfaces:
jakarta.servlet.Servlet, jakarta.servlet.ServletConfig, Serializable, BasicUniversalConfig, DefaultConfig, DefaultHtmlConfig

Root router resource for the Spring Boot deployment.

Extends BasicSpringRestServletGroup (i.e. SpringRestServlet) so child resources can be resolved as Spring beans — required for HelloResource to receive its @Autowired HelloMessageProvider. Mounts the deployment-agnostic PetStoreResource from juneau-petstore-core alongside the local HelloResource injection demo.

Note: this Spring Boot deployment intentionally does NOT mount the Jetty/Microservice admin trio (ConfigResource/LogsResource/ShutdownResource, now in the juneau-microservice-examples module) — those are Jetty-only and have no meaningful analogue here (Spring Boot has its own actuator surface). This is the documented non-parity deployment-specific difference between the two petstore deployments.

See Also:
  • Constructor Details

  • Method Details

    • petStore

      public PetStore petStore()
      Registers the one PetStore shared by the /petstore API and the console tree, seeded with the deterministic demo data set.

      Child resources inherit the group's beans, so a plain @Bean method is all that is needed.

      Returns:
      The seeded PetStore.
    • index

      public SeeOther index(RestRequest req)
      GET / goes to the console store page.
      Parameters:
      req - The request.
      Returns:
      A 303 to /console/store.