Class SpringRestServlet

java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
org.apache.juneau.rest.server.servlet.RestServlet
org.apache.juneau.rest.server.springboot.SpringRestServlet
All Implemented Interfaces:
jakarta.servlet.Servlet, jakarta.servlet.ServletConfig, Serializable
Direct Known Subclasses:
BasicSpringRestServlet

public abstract class SpringRestServlet extends RestServlet
Subclass of a RestServlet that hooks into Spring Boot for using Spring Beans.
Notes:
See Also:
  • Constructor Details

  • Method Details

    • createBeanStore

      Hook into Spring bean injection framework.

      If no ApplicationContext was injected (e.g. the servlet was created with new outside of Spring, or the injected Optional is empty), the returned store degrades gracefully to one with no Spring context that only resolves beans from the parent chain.

      Parameters:
      parent - Optional parent resource bean store, used as a fallback after Spring's context.
      Returns:
      A WritableBeanStore backed by Spring's ApplicationContext.