Skip to content

Commit 85bdea6

Browse files
committed
Fix code formatting in Javadoc
See gh-27480
1 parent bfdc99a commit 85bdea6

File tree

1 file changed

+38
-44
lines changed

1 file changed

+38
-44
lines changed

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

Lines changed: 38 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -62,54 +62,51 @@
6262
* <p>Example usage with
6363
* {@link MappingJackson2HttpMessageConverter}:
6464
*
65-
* <pre class="code">{@code
66-
* <bean class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter">
67-
* <property name="objectMapper">
68-
* <bean class="org.springframework.http.converter.json.Jackson2ObjectMapperFactoryBean"
65+
* <pre class="code">
66+
* &lt;bean class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter"&gt;
67+
* &lt;property name="objectMapper"&gt;
68+
* &lt;bean class="org.springframework.http.converter.json.Jackson2ObjectMapperFactoryBean"
6969
* p:autoDetectFields="false"
7070
* p:autoDetectGettersSetters="false"
71-
* p:annotationIntrospector-ref="jaxbAnnotationIntrospector" />
72-
* </property>
73-
* </bean>
74-
* }</pre>
71+
* p:annotationIntrospector-ref="jaxbAnnotationIntrospector" /&gt;
72+
* &lt;/property&gt;
73+
* &lt;/bean&gt;</pre>
7574
*
7675
* <p>Example usage with MappingJackson2JsonView:
7776
*
78-
* <pre class="code">{@code
79-
* <bean class="org.springframework.web.servlet.view.json.MappingJackson2JsonView">
80-
* <property name="objectMapper">
81-
* <bean class="org.springframework.http.converter.json.Jackson2ObjectMapperFactoryBean"
77+
* <pre class="code">
78+
* &lt;bean class="org.springframework.web.servlet.view.json.MappingJackson2JsonView"&gt;
79+
* &lt;property name="objectMapper"&gt;
80+
* &lt;bean class="org.springframework.http.converter.json.Jackson2ObjectMapperFactoryBean"
8281
* p:failOnEmptyBeans="false"
83-
* p:indentOutput="true">
84-
* <property name="serializers">
85-
* <array>
86-
* <bean class="org.mycompany.MyCustomSerializer" />
87-
* </array>
88-
* </property>
89-
* </bean>
90-
* </property>
91-
* </bean>
92-
* }</pre>
82+
* p:indentOutput="true"&gt;
83+
* &lt;property name="serializers"&gt;
84+
* &lt;array&gt;
85+
* &lt;bean class="org.mycompany.MyCustomSerializer" /&gt;
86+
* &lt;/array&gt;
87+
* &lt;/property&gt;
88+
* &lt;/bean&gt;
89+
* &lt;/property&gt;
90+
* &lt;/bean&gt;</pre>
9391
*
9492
* <p>In case there are no specific setters provided (for some rarely used options),
9593
* you can still use the more general methods {@link #setFeaturesToEnable} and
9694
* {@link #setFeaturesToDisable}.
9795
*
98-
* <pre class="code">{@code
99-
* <bean class="org.springframework.http.converter.json.Jackson2ObjectMapperFactoryBean">
100-
* <property name="featuresToEnable">
101-
* <array>
102-
* <util:constant static-field="com.fasterxml.jackson.databind.SerializationFeature.WRAP_ROOT_VALUE"/>
103-
* <util:constant static-field="com.fasterxml.jackson.databind.SerializationFeature.CLOSE_CLOSEABLE"/>
104-
* </array>
105-
* </property>
106-
* <property name="featuresToDisable">
107-
* <array>
108-
* <util:constant static-field="com.fasterxml.jackson.databind.MapperFeature.USE_ANNOTATIONS"/>
109-
* </array>
110-
* </property>
111-
* </bean>
112-
* }</pre>
96+
* <pre class="code">
97+
* &lt;bean class="org.springframework.http.converter.json.Jackson2ObjectMapperFactoryBean"&gt;
98+
* &lt;property name="featuresToEnable"&gt;
99+
* &lt;array&gt;
100+
* &lt;util:constant static-field="com.fasterxml.jackson.databind.SerializationFeature.WRAP_ROOT_VALUE"/&gt;
101+
* &lt;util:constant static-field="com.fasterxml.jackson.databind.SerializationFeature.CLOSE_CLOSEABLE"/&gt;
102+
* &lt;/array&gt;
103+
* &lt;/property&gt;
104+
* &lt;property name="featuresToDisable"&gt;
105+
* &lt;array&gt;
106+
* &lt;util:constant static-field="com.fasterxml.jackson.databind.MapperFeature.USE_ANNOTATIONS"/&gt;
107+
* &lt;/array&gt;
108+
* &lt;/property&gt;
109+
* &lt;/bean&gt;</pre>
113110
*
114111
* <p>It also automatically registers the following well-known modules if they are
115112
* detected on the classpath:
@@ -120,20 +117,17 @@
120117
* support for other Java 8 types like {@link java.util.Optional}</li>
121118
* <li><a href="https://github.com/FasterXML/jackson-datatype-jsr310">jackson-datatype-jsr310</a>:
122119
* support for Java 8 Date &amp; Time API types</li>
123-
* <li><a href="https://github.com/FasterXML/jackson-datatype-joda">jackson-datatype-joda</a>:
124-
* support for Joda-Time types</li>
125120
* <li><a href="https://github.com/FasterXML/jackson-module-kotlin">jackson-module-kotlin</a>:
126121
* support for Kotlin classes and data classes</li>
127122
* </ul>
128123
*
129124
* <p>In case you want to configure Jackson's {@link ObjectMapper} with a custom {@link Module},
130125
* you can register one or more such Modules by class name via {@link #setModulesToInstall}:
131126
*
132-
* <pre class="code">{@code
133-
* <bean class="org.springframework.http.converter.json.Jackson2ObjectMapperFactoryBean">
134-
* <property name="modulesToInstall" value="myapp.jackson.MySampleModule,myapp.jackson.MyOtherModule"/>
135-
* </bean
136-
* }</pre>
127+
* <pre class="code">
128+
* &lt;bean class="org.springframework.http.converter.json.Jackson2ObjectMapperFactoryBean"&gt;
129+
* &lt;property name="modulesToInstall" value="myapp.jackson.MySampleModule,myapp.jackson.MyOtherModule"/&gt;
130+
* &lt;/bean&gt;</pre>
137131
*
138132
* <p>Compatible with Jackson 2.9 to 2.12, as of Spring 5.3.
139133
*

0 commit comments

Comments
 (0)