Class BasicSpringRestServlet
java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
org.apache.juneau.rest.servlet.RestServlet
org.apache.juneau.rest.springboot.SpringRestServlet
org.apache.juneau.rest.springboot.BasicSpringRestServlet
- All Implemented Interfaces:
jakarta.servlet.Servlet,jakarta.servlet.ServletConfig,Serializable,BasicUniversalConfig,DefaultConfig,DefaultHtmlConfig,BasicRestOperations
- Direct Known Subclasses:
BasicSpringRestServletGroup
public abstract class BasicSpringRestServlet
extends SpringRestServlet
implements BasicRestOperations, BasicUniversalConfig
Subclass of
SpringRestServlet with default settings and standard methods defined.
Meant as base class for top-level REST resources in Spring Boot environments.
Provides support for JSON, XML, HTML, URL-Encoding, UON, XML, OpenAPI, and MessagePack. See BasicUniversalConfig
for details.
Implements the basic REST endpoints defined in BasicRestOperations.
See Also:
-
Field Summary
Fields inherited from class jakarta.servlet.http.HttpServlet
LEGACY_DO_HEAD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiderror()[* /error] - Error occurred.[GET favicon.ico] - Retrieve favorites icon image.[GET /htdocs/*] - Retrieve static file.getStats(RestRequest req) [GET /stats] - Timing statistics.getSwagger(RestRequest req) [GET /api] - Show resource options.Methods inherited from class org.apache.juneau.rest.springboot.SpringRestServlet
createBeanStoreMethods inherited from class org.apache.juneau.rest.servlet.RestServlet
destroy, doLog, getContext, getPath, getRequest, getResponse, init, log, log, service, setContextMethods inherited from class jakarta.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPatch, doPost, doPut, doTrace, getLastModified, isSensitiveHeader, serviceMethods inherited from class jakarta.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
-
Constructor Details
-
BasicSpringRestServlet
public BasicSpringRestServlet()
-
-
Method Details
-
error
Description copied from interface:BasicRestOperations[* /error] - Error occurred.- Specified by:
errorin interfaceBasicRestOperations
-
getFavIcon
Description copied from interface:BasicRestOperations[GET favicon.ico] - Retrieve favorites icon image.- Specified by:
getFavIconin interfaceBasicRestOperations- Returns:
- A bean containing the contents for the OPTIONS page.
-
getHtdoc
Description copied from interface:BasicRestOperations[GET /htdocs/*] - Retrieve static file.- Specified by:
getHtdocin interfaceBasicRestOperations- Parameters:
path- The path to retrieve.locale- The locale of the HTTP request.- Returns:
- An HTTP resource representing the static file.
- Throws:
NotFound
-
getStats
Description copied from interface:BasicRestOperations[GET /stats] - Timing statistics.Timing statistics for method invocations on this resource.
- Specified by:
getStatsin interfaceBasicRestOperations- Parameters:
req- The HTTP request.- Returns:
- A collection of timing statistics for each annotated method on this resource.
-
getSwagger
Description copied from interface:BasicRestOperations[GET /api] - Show resource options.- Specified by:
getSwaggerin interfaceBasicRestOperations- Parameters:
req- The HTTP request.- Returns:
- A bean containing the contents for the OPTIONS page.
-