Skip to content

Commit 5661d38

Browse files
committed
Fixed Jackson2ObjectMapperFactoryBean class name in javadoc examples
1 parent 11b3fe2 commit 5661d38

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed

spring-web/src/main/java/org/springframework/http/converter/json/Jackson2ObjectMapperFactoryBean.java

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
* <pre class="code">
5656
* &lt;bean class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter">
5757
* &lt;property name="objectMapper">
58-
* &lt;bean class="org.springframework.web.context.support.Jackson2ObjectMapperFactoryBean"
58+
* &lt;bean class="org.springframework.http.converter.json.Jackson2ObjectMapperFactoryBean"
5959
* p:autoDetectFields="false"
6060
* p:autoDetectGettersSetters="false"
6161
* p:annotationIntrospector-ref="jaxbAnnotationIntrospector" />
@@ -68,7 +68,7 @@
6868
* <pre class="code">
6969
* &lt;bean class="org.springframework.web.servlet.view.json.MappingJackson2JsonView">
7070
* &lt;property name="objectMapper">
71-
* &lt;bean class="org.springframework.web.context.support.Jackson2ObjectMapperFactoryBean"
71+
* &lt;bean class="org.springframework.http.converter.json.Jackson2ObjectMapperFactoryBean"
7272
* p:failOnEmptyBeans="false"
7373
* p:indentOutput="true">
7474
* &lt;property name="serializers">
@@ -81,12 +81,12 @@
8181
* &lt;/bean>
8282
* </pre>
8383
*
84-
* <p>In case there are no specific setters provided (for some rarely used
85-
* options), you can still use the more general methods
86-
* {@link #setFeaturesToEnable(Object[])} and {@link #setFeaturesToDisable(Object[])}.
84+
* <p>In case there are no specific setters provided (for some rarely used options),
85+
* you can still use the more general methods {@link #setFeaturesToEnable} and
86+
* {@link #setFeaturesToDisable}.
8787
*
8888
* <pre class="code">
89-
* &lt;bean class="org.springframework.web.context.support.Jackson2ObjectMapperFactoryBean">
89+
* &lt;bean class="org.springframework.http.converter.json.Jackson2ObjectMapperFactoryBean">
9090
* &lt;property name="featuresToEnable">
9191
* &lt;array>
9292
* &lt;util:constant static-field="com.fasterxml.jackson.databind.SerializationFeature$WRAP_ROOT_VALUE"/>
@@ -101,19 +101,18 @@
101101
* &lt;/bean>
102102
* </pre>
103103
*
104-
* In case you want to configure Jackson's {@link ObjectMapper} with a {@link Module}, you
105-
* can register Modules using {@link #setModules(java.util.List)}
104+
* <p>In case you want to configure Jackson's {@link ObjectMapper} with a custom {@link Module},
105+
* you can register one or more such Modules by class name via {@link #setModulesToInstall}:
106106
*
107107
* <pre class="code">
108-
* &lt;bean class="org.springframework.web.context.support.Jackson2ObjectMapperFactoryBean">
109-
* &lt;property name="modules"&gt;
110-
* &lt;list&gt;
111-
* &lt;bean class="org.example.jackson.module.MySampleModule"/&gt;
112-
* &lt;/list&gt;
113-
* &lt;/property&gt;
114-
* &lt;/bean>
108+
* &lt;bean class="org.springframework.http.converter.json.Jackson2ObjectMapperFactoryBean">
109+
* &lt;property name="modulesToInstall" value="myapp.jackson.MySampleModule,myapp.jackson.MyOtherModule"/>
110+
* &lt;/bean
115111
* </pre>
116112
*
113+
* Note that Jackson's JSR-310 and Joda-Time support modules will be registered automatically
114+
* when available (and when Java 8 and Joda-Time themselves are available, respectively).
115+
*
117116
* <p>Tested against Jackson 2.2 and 2.3; compatible with Jackson 2.0 and higher.
118117
*
119118
* @author <a href="mailto:[email protected]">Dmitry Katsubo</a>

0 commit comments

Comments
 (0)