提交 5661d382 编写于 作者: J Juergen Hoeller

Fixed Jackson2ObjectMapperFactoryBean class name in javadoc examples

上级 11b3fe22
......@@ -55,7 +55,7 @@ import org.springframework.util.ClassUtils;
* <pre class="code">
* &lt;bean class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter">
* &lt;property name="objectMapper">
* &lt;bean class="org.springframework.web.context.support.Jackson2ObjectMapperFactoryBean"
* &lt;bean class="org.springframework.http.converter.json.Jackson2ObjectMapperFactoryBean"
* p:autoDetectFields="false"
* p:autoDetectGettersSetters="false"
* p:annotationIntrospector-ref="jaxbAnnotationIntrospector" />
......@@ -68,7 +68,7 @@ import org.springframework.util.ClassUtils;
* <pre class="code">
* &lt;bean class="org.springframework.web.servlet.view.json.MappingJackson2JsonView">
* &lt;property name="objectMapper">
* &lt;bean class="org.springframework.web.context.support.Jackson2ObjectMapperFactoryBean"
* &lt;bean class="org.springframework.http.converter.json.Jackson2ObjectMapperFactoryBean"
* p:failOnEmptyBeans="false"
* p:indentOutput="true">
* &lt;property name="serializers">
......@@ -81,12 +81,12 @@ import org.springframework.util.ClassUtils;
* &lt;/bean>
* </pre>
*
* <p>In case there are no specific setters provided (for some rarely used
* options), you can still use the more general methods
* {@link #setFeaturesToEnable(Object[])} and {@link #setFeaturesToDisable(Object[])}.
* <p>In case there are no specific setters provided (for some rarely used options),
* you can still use the more general methods {@link #setFeaturesToEnable} and
* {@link #setFeaturesToDisable}.
*
* <pre class="code">
* &lt;bean class="org.springframework.web.context.support.Jackson2ObjectMapperFactoryBean">
* &lt;bean class="org.springframework.http.converter.json.Jackson2ObjectMapperFactoryBean">
* &lt;property name="featuresToEnable">
* &lt;array>
* &lt;util:constant static-field="com.fasterxml.jackson.databind.SerializationFeature$WRAP_ROOT_VALUE"/>
......@@ -101,19 +101,18 @@ import org.springframework.util.ClassUtils;
* &lt;/bean>
* </pre>
*
* In case you want to configure Jackson's {@link ObjectMapper} with a {@link Module}, you
* can register Modules using {@link #setModules(java.util.List)}
* <p>In case you want to configure Jackson's {@link ObjectMapper} with a custom {@link Module},
* you can register one or more such Modules by class name via {@link #setModulesToInstall}:
*
* <pre class="code">
* &lt;bean class="org.springframework.web.context.support.Jackson2ObjectMapperFactoryBean">
* &lt;property name="modules"&gt;
* &lt;list&gt;
* &lt;bean class="org.example.jackson.module.MySampleModule"/&gt;
* &lt;/list&gt;
* &lt;/property&gt;
* &lt;/bean>
* &lt;bean class="org.springframework.http.converter.json.Jackson2ObjectMapperFactoryBean">
* &lt;property name="modulesToInstall" value="myapp.jackson.MySampleModule,myapp.jackson.MyOtherModule"/>
* &lt;/bean
* </pre>
*
* Note that Jackson's JSR-310 and Joda-Time support modules will be registered automatically
* when available (and when Java 8 and Joda-Time themselves are available, respectively).
*
* <p>Tested against Jackson 2.2 and 2.3; compatible with Jackson 2.0 and higher.
*
* @author <a href="mailto:dmitry.katsubo@gmail.com">Dmitry Katsubo</a>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册