类 MappingJackson2XmlView
java.lang.Object
cn.taketoday.context.support.ApplicationObjectSupport
cn.taketoday.web.view.AbstractView
cn.taketoday.web.view.json.AbstractJackson2View
cn.taketoday.web.view.xml.MappingJackson2XmlView
- 所有已实现的接口:
cn.taketoday.beans.factory.Aware,cn.taketoday.beans.factory.BeanNameAware,cn.taketoday.context.ApplicationContextAware,View
Framework MVC
View that renders XML content by serializing the model for the current request
using Jackson 2's XmlMapper.
The Object to be serialized is supplied as a parameter in the model. The first serializable
entry is used. Users can either specify a specific entry in the model via the
sourceKey property.
The default constructor uses the default configuration provided by Jackson2ObjectMapperBuilder.
Compatible with Jackson 2.9 to 2.12.
- 作者:
- Sebastien Deleuze
- 另请参阅:
-
字段概要
字段从类继承的字段 cn.taketoday.web.view.json.AbstractJackson2View
updateContentLength从类继承的字段 cn.taketoday.context.support.ApplicationObjectSupport
applicationContext, log, messageSourceAccessor从接口继承的字段 cn.taketoday.web.view.View
RESPONSE_STATUS_ATTRIBUTE, SELECTED_CONTENT_TYPE -
构造器概要
构造器构造器说明Construct a newMappingJackson2XmlViewusing default configuration provided byJackson2ObjectMapperBuilderand setting the content type toapplication/xml.MappingJackson2XmlView(XmlMapper xmlMapper) Construct a newMappingJackson2XmlViewusing the providedXmlMapperand setting the content type toapplication/xml. -
方法概要
修饰符和类型方法说明protected ObjectfilterModel(Map<String, Object> model) Filter out undesired attributes from the given model.voidsetModelKey(String modelKey) Set the attribute in the model that should be rendered by this view.从类继承的方法 cn.taketoday.web.view.json.AbstractJackson2View
filterAndWrapModel, getEncoding, getObjectMapper, prepareResponse, renderMergedOutputModel, setDisableCaching, setEncoding, setObjectMapper, setPrettyPrint, setUpdateContentLength, writeContent, writePrefix, writeSuffix从类继承的方法 cn.taketoday.web.view.AbstractView
addStaticAttribute, createMergedOutputModel, createTemporaryOutputStream, exposeModelAsRequestAttributes, formatViewName, generatesDownloadContent, getAttributesMap, getBeanName, getContentType, getRequestContextAttribute, getRequestContextToExpose, getStaticAttributes, isExposePathVariables, render, setAttributes, setAttributesCSV, setAttributesMap, setBeanName, setContentType, setExposeContextBeansAsAttributes, setExposedContextBeanNames, setExposeOutputRedirectModel, setExposePathVariables, setRequestContextAttribute, setResponseContentType, toString, writeToResponse从类继承的方法 cn.taketoday.context.support.ApplicationObjectSupport
getApplicationContext, getMessageSourceAccessor, initApplicationContext, initApplicationContext, isContextRequired, obtainApplicationContext, requiredContextClass, setApplicationContext, unwrapContext, unwrapFactory
-
字段详细资料
-
DEFAULT_CONTENT_TYPE
The default content type for the view.- 另请参阅:
-
modelKey
-
-
构造器详细资料
-
MappingJackson2XmlView
public MappingJackson2XmlView()Construct a newMappingJackson2XmlViewusing default configuration provided byJackson2ObjectMapperBuilderand setting the content type toapplication/xml. -
MappingJackson2XmlView
Construct a newMappingJackson2XmlViewusing the providedXmlMapperand setting the content type toapplication/xml.
-
-
方法详细资料
-
setModelKey
从类复制的说明:AbstractJackson2ViewSet the attribute in the model that should be rendered by this view. When set, all other model attributes will be ignored.- 指定者:
setModelKey在类中AbstractJackson2View
-
filterModel
从类复制的说明:AbstractJackson2ViewFilter out undesired attributes from the given model. The return value can be either anotherMapor a single value object.- 指定者:
filterModel在类中AbstractJackson2View- 参数:
model- the model, as passed on toAbstractJackson2View.renderMergedOutputModel(java.util.Map<java.lang.String, java.lang.Object>, cn.taketoday.web.RequestContext)- 返回:
- the value to be rendered
-