public class FastJsonJsonView
extends org.springframework.web.servlet.view.AbstractView
Compatible fastjson 1.2.x
AbstractView| Constructor and Description |
|---|
FastJsonJsonView()
Set default param.
|
| Modifier and Type | Method and Description |
|---|---|
protected Object |
filterModel(Map<String,Object> model)
Filters out undesired attributes from the given model.
|
FastJsonConfig |
getFastJsonConfig() |
boolean |
isExtractValueFromSingleKeyModel()
Check extractValueFromSingleKeyModel.
|
protected void |
prepareResponse(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
protected void |
renderMergedOutputModel(Map<String,Object> model,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
void |
setDisableCaching(boolean disableCaching)
Disables caching of the generated JSON.
|
void |
setExtractValueFromSingleKeyModel(boolean extractValueFromSingleKeyModel)
Set extractValueFromSingleKeyModel.
|
void |
setFastJsonConfig(FastJsonConfig fastJsonConfig) |
void |
setRenderedAttributes(Set<String> renderedAttributes)
Set renderedAttributes.
|
protected void |
setResponseContentType(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
void |
setUpdateContentLength(boolean updateContentLength)
Whether to update the 'Content-Length' header of the response.
|
addStaticAttribute, createMergedOutputModel, createRequestContext, createTemporaryOutputStream, exposeModelAsRequestAttributes, formatViewName, generatesDownloadContent, getAttributesMap, getBeanName, getContentType, getRequestContextAttribute, getRequestToExpose, getStaticAttributes, isExposePathVariables, render, setAttributes, setAttributesCSV, setAttributesMap, setBeanName, setContentType, setExposeContextBeansAsAttributes, setExposedContextBeanNames, setExposePathVariables, setRequestContextAttribute, toString, writeToResponsegetServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContextpublic FastJsonConfig getFastJsonConfig()
public void setFastJsonConfig(FastJsonConfig fastJsonConfig)
fastJsonConfig - the fastJsonConfig to set.public void setRenderedAttributes(Set<String> renderedAttributes)
renderedAttributes - renderedAttributespublic boolean isExtractValueFromSingleKeyModel()
public void setExtractValueFromSingleKeyModel(boolean extractValueFromSingleKeyModel)
protected void renderMergedOutputModel(Map<String,Object> model, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Exception
renderMergedOutputModel in class org.springframework.web.servlet.view.AbstractViewExceptionprotected void prepareResponse(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
prepareResponse in class org.springframework.web.servlet.view.AbstractViewpublic void setDisableCaching(boolean disableCaching)
Default is true, which will prevent the client from caching the
generated JSON.
public void setUpdateContentLength(boolean updateContentLength)
true, the response is buffered in order to determine the
content length and set the 'Content-Length' header of the response.
The default setting is false.
protected Object filterModel(Map<String,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)protected void setResponseContentType(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
setResponseContentType in class org.springframework.web.servlet.view.AbstractViewCopyright © 2022 Alibaba Group. All rights reserved.