public class EmptyView
extends org.springframework.web.servlet.view.AbstractView
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_CONTENT_TYPE
Default content type.
|
| Constructor and Description |
|---|
EmptyView() |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.Object |
filterModel(java.util.Map<java.lang.String,java.lang.Object> model)
Filters out undesired attributes from the given model.
|
protected void |
prepareResponse(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
protected void |
renderMergedOutputModel(java.util.Map<java.lang.String,java.lang.Object> model,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
void |
setEncoding(com.fasterxml.jackson.core.JsonEncoding encoding)
Sets the
JsonEncoding for this converter. |
void |
setObjectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
Sets the
ObjectMapper for this view. |
void |
setRenderedAttributes(java.util.Set<java.lang.String> renderedAttributes)
Sets the attributes in the model that should be rendered by this view.
|
addStaticAttribute, createMergedOutputModel, createRequestContext, createTemporaryOutputStream, exposeModelAsRequestAttributes, generatesDownloadContent, getAttributesMap, getBeanName, getContentType, getRequestContextAttribute, getRequestToExpose, getStaticAttributes, isExposePathVariables, render, setAttributes, setAttributesCSV, setAttributesMap, setBeanName, setContentType, setExposeContextBeansAsAttributes, setExposedContextBeanNames, setExposePathVariables, setRequestContextAttribute, setResponseContentType, toString, writeToResponsegetServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContextpublic static final java.lang.String DEFAULT_CONTENT_TYPE
public void setObjectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
ObjectMapper for this view. If not set, a default ObjectMapper
is used.
Setting a custom-configured ObjectMapper is one way to take further control of the JSON serialization
process. For example, an extended SerializerFactory can be configured that provides custom serializers for
specific types. The other option for refining the serialization process is to use Jackson's provided annotations on
the types to be serialized, in which case a custom-configured ObjectMapper is unnecessary.
public void setEncoding(com.fasterxml.jackson.core.JsonEncoding encoding)
JsonEncoding for this converter. By default, UTF-8 is used.public void setRenderedAttributes(java.util.Set<java.lang.String> renderedAttributes)
protected void prepareResponse(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
prepareResponse in class org.springframework.web.servlet.view.AbstractViewprotected void renderMergedOutputModel(java.util.Map<java.lang.String,java.lang.Object> model,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.lang.Exception
renderMergedOutputModel in class org.springframework.web.servlet.view.AbstractViewjava.lang.Exceptionprotected java.lang.Object filterModel(java.util.Map<java.lang.String,java.lang.Object> model)
Map, or a
single value object.
Default implementation removes BindingResult instances and entries not included in the renderedAttributes property.
model - the model, as passed on to renderMergedOutputModel(java.util.Map<java.lang.String, java.lang.Object>, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)Copyright © 2009-2023 Apereo. All Rights Reserved.