Consistent use of <pre class="code">

Issue: SPR-8108
This commit is contained in:
Juergen Hoeller
2013-05-07 21:31:26 +02:00
parent 1ca943c681
commit 2a44228b98
59 changed files with 87 additions and 90 deletions

View File

@@ -35,7 +35,7 @@ import org.springframework.util.Assert;
* {@link #setSupportedMediaTypes supportedMediaTypes} property.
* Example of usage:
*
* <pre>
* <pre class="code">
* &lt;bean class="org.springframework.http.converter.ObjectToStringHttpMessageConverter">
* &lt;constructor-arg>
* &lt;bean class="org.springframework.context.support.ConversionServiceFactoryBean"/>

View File

@@ -45,7 +45,7 @@ import org.springframework.util.Assert;
* <p>Example usage with
* {@link org.springframework.http.converter.json.MappingJackson2HttpMessageConverter}:
*
* <pre>
* <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"
@@ -58,7 +58,7 @@ import org.springframework.util.Assert;
*
* <p>Example usage with MappingJackson2JsonView:
*
* <pre>
* <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"
@@ -78,7 +78,7 @@ import org.springframework.util.Assert;
* options), you can still use the more general methods
* {@link #setFeaturesToEnable(Object[])} and {@link #setFeaturesToDisable(Object[])}.
*
* <pre>
* <pre class="code">
* &lt;bean class="org.springframework.web.context.support.Jackson2ObjectMapperFactoryBean">
* &lt;property name="featuresToEnable">
* &lt;array>

View File

@@ -36,7 +36,7 @@ import org.springframework.beans.factory.InitializingBean;
* to enable or disable Jackson features from within XML configuration.
*
* <p>Example usage with MappingJacksonHttpMessageConverter:
* <pre>
* <pre class="code">
* &lt;bean class="org.springframework.http.converter.json.MappingJacksonHttpMessageConverter">
* &lt;property name="objectMapper">
* &lt;bean class="org.springframework.web.context.support.JacksonObjectMapperFactoryBean"
@@ -48,7 +48,7 @@ import org.springframework.beans.factory.InitializingBean;
* </pre>
*
* <p>Example usage with MappingJacksonJsonView:
* <pre>
* <pre class="code">
* &lt;bean class="org.springframework.web.servlet.view.json.MappingJacksonJsonView">
* &lt;property name="objectMapper">
* &lt;bean class="org.springframework.web.context.support.JacksonObjectMapperFactoryBean"
@@ -63,7 +63,7 @@ import org.springframework.beans.factory.InitializingBean;
* options), you can still use the more general methods
* {@link #setFeaturesToEnable(Object[])} and {@link #setFeaturesToDisable(Object[])}.
*
* <pre>
* <pre class="code">
* &lt;bean class="org.springframework.web.context.support.JacksonObjectMapperFactoryBean">
* &lt;property name="featuresToEnable">
* &lt;array>

View File

@@ -111,7 +111,7 @@ public class MappingJackson2HttpMessageConverter extends AbstractHttpMessageConv
/**
* Whether to use the {@link DefaultPrettyPrinter} when writing JSON.
* This is a shortcut for setting up an {@code ObjectMapper} as follows:
* <pre>
* <pre class="code">
* ObjectMapper mapper = new ObjectMapper();
* mapper.configure(SerializationFeature.INDENT_OUTPUT, true);
* converter.setObjectMapper(mapper);

View File

@@ -109,7 +109,7 @@ public class MappingJacksonHttpMessageConverter extends AbstractHttpMessageConve
/**
* Whether to use the {@link org.codehaus.jackson.util.DefaultPrettyPrinter} when writing JSON.
* This is a shortcut for setting up an {@code ObjectMapper} as follows:
* <pre>
* <pre class="code">
* ObjectMapper mapper = new ObjectMapper();
* mapper.configure(SerializationConfig.Feature.INDENT_OUTPUT, true);
* converter.setObjectMapper(mapper);

View File

@@ -321,7 +321,7 @@ public @interface RequestMapping {
* specified header is <i>not</i> supposed to be present in the request.
* <p>Also supports media type wildcards (*), for headers such as Accept
* and Content-Type. For instance,
* <pre>
* <pre class="code">
* &#064;RequestMapping(value = "/something", headers = "content-type=text/*")
* </pre>
* will match requests with a Content-Type of "text/html", "text/plain", etc.
@@ -340,7 +340,7 @@ public @interface RequestMapping {
* <p>The format is a single media type or a sequence of media types,
* with a request only mapped if the {@code Content-Type} matches one of these media types.
* Examples:
* <pre>
* <pre class="code">
* consumes = "text/plain"
* consumes = {"text/plain", "application/*"}
* </pre>
@@ -359,7 +359,7 @@ public @interface RequestMapping {
* <p>The format is a single media type or a sequence of media types,
* with a request only mapped if the {@code Accept} matches one of these media types.
* Examples:
* <pre>
* <pre class="code">
* produces = "text/plain"
* produces = {"text/plain", "application/*"}
* </pre>

View File

@@ -79,14 +79,14 @@ import org.springframework.web.util.UriTemplate;
* {@link #getForObject(String, Class, Map)}), and are capable of substituting any {@linkplain UriTemplate URI templates}
* in that URL using either a {@code String} variable arguments array, or a {@code Map<String, String>}.
* The string varargs variant expands the given template variables in order, so that
* <pre>
* <pre class="code">
* String result = restTemplate.getForObject("http://example.com/hotels/{hotel}/bookings/{booking}", String.class, "42",
* "21");
* </pre>
* will perform a GET on {@code http://example.com/hotels/42/bookings/21}. The map variant expands the template based
* on variable name, and is therefore more useful when using many variables, or when a single variable is used multiple
* times. For example:
* <pre>
* <pre class="code">
* Map&lt;String, String&gt; vars = Collections.singletonMap("hotel", "42");
* String result = restTemplate.getForObject("http://example.com/hotels/{hotel}/rooms/{hotel}", String.class, vars);
* </pre>
@@ -95,7 +95,7 @@ import org.springframework.web.util.UriTemplate;
* expanded URI multiple times.
*
* <p>Furthermore, the {@code String}-argument methods assume that the URL String is unencoded. This means that
* <pre>
* <pre class="code">
* restTemplate.getForObject("http://example.com/hotel list");
* </pre>
* will perform a GET on {@code http://example.com/hotel%20list}. As a result, any URL passed that is already encoded

View File

@@ -29,7 +29,7 @@ import org.springframework.web.context.WebApplicationContext;
* <p>Configure this handler proxy in your {@code faces-config.xml} file
* as follows:
*
* <pre>
* <pre class="code">
* &lt;application&gt;
* ...
* &lt;navigation-handler&gt;
@@ -43,7 +43,7 @@ import org.springframework.web.context.WebApplicationContext;
* Spring bean definition like the following. However, all of Spring's bean configuration
* power can be applied to such a bean, in particular all flavors of dependency injection.
*
* <pre>
* <pre class="code">
* &lt;bean name="jsfNavigationHandler" class="mypackage.MyNavigationHandler"&gt;
* &lt;property name="myProperty" ref="myOtherBean"/&gt;
* &lt;/bean&gt;</pre>

View File

@@ -30,7 +30,7 @@ import org.springframework.web.jsf.FacesContextUtils;
*
* <p>Configure this resolver in your {@code faces-config.xml} file as follows:
*
* <pre>
* <pre class="code">
* &lt;application>
* ...
* &lt;el-resolver>org.springframework.web.jsf.el.SpringBeanFacesELResolver&lt;/el-resolver>
@@ -40,7 +40,7 @@ import org.springframework.web.jsf.FacesContextUtils;
* Spring-managed service layer beans, for example in property values of
* JSF-managed beans:
*
* <pre>
* <pre class="code">
* &lt;managed-bean>
* &lt;managed-bean-name>myJsfManagedBean&lt;/managed-bean-name>
* &lt;managed-bean-class>example.MyJsfManagedBean&lt;/managed-bean-class>
@@ -54,7 +54,7 @@ import org.springframework.web.jsf.FacesContextUtils;
* with "mySpringManagedBusinessObject" defined as Spring bean in
* applicationContext.xml:
*
* <pre>
* <pre class="code">
* &lt;bean id="mySpringManagedBusinessObject" class="example.MySpringManagedBusinessObject">
* ...
* &lt;/bean></pre>

View File

@@ -42,7 +42,7 @@ import org.springframework.web.jsf.FacesContextUtils;
*
* <p>Configure this resolver in your {@code faces-config.xml} file as follows:
*
* <pre>
* <pre class="code">
* &lt;application>
* ...
* &lt;el-resolver>org.springframework.web.jsf.el.WebApplicationContextFacesELResolver&lt;/el-resolver>

View File

@@ -150,7 +150,7 @@ public class UriComponentsBuilder {
* contains {@code '='} or {@code '&'} characters, the query string cannot
* be parsed unambiguously. Such values should be substituted for URI
* variables to enable correct parsing:
* <pre>
* <pre class="code">
* String uriString = &quot;/hotels/42?filter={value}&quot;;
* UriComponentsBuilder.fromUriString(uriString).buildAndExpand(&quot;hot&amp;cold&quot;);
* </pre>
@@ -210,7 +210,7 @@ public class UriComponentsBuilder {
* contains {@code '='} or {@code '&'} characters, the query string cannot
* be parsed unambiguously. Such values should be substituted for URI
* variables to enable correct parsing:
* <pre>
* <pre class="code">
* String uriString = &quot;/hotels/42?filter={value}&quot;;
* UriComponentsBuilder.fromUriString(uriString).buildAndExpand(&quot;hot&amp;cold&quot;);
* </pre>
@@ -448,7 +448,7 @@ public class UriComponentsBuilder {
* contains {@code '='} or {@code '&'} characters, the query string cannot
* be parsed unambiguously. Such values should be substituted for URI
* variables to enable correct parsing:
* <pre>
* <pre class="code">
* String uriString = &quot;/hotels/42?filter={value}&quot;;
* UriComponentsBuilder.fromUriString(uriString).buildAndExpand(&quot;hot&amp;cold&quot;);
* </pre>

View File

@@ -73,7 +73,7 @@ public abstract class UriUtils {
* <p><strong>Note</strong> that this method does not attempt to encode "=" and "&"
* characters in query parameter names and query parameter values because they cannot
* be parsed in a reliable way. Instead use:
* <pre>
* <pre class="code">
* UriComponents uriComponents = UriComponentsBuilder.fromUri("/path?name={value}").buildAndExpand("a=b");
* String encodedUri = uriComponents.encode().toUriString();
* </pre>
@@ -114,7 +114,7 @@ public abstract class UriUtils {
* <p><strong>Note</strong> that this method does not attempt to encode "=" and "&"
* characters in query parameter names and query parameter values because they cannot
* be parsed in a reliable way. Instead use:
* <pre>
* <pre class="code">
* UriComponents uriComponents = UriComponentsBuilder.fromHttpUrl("/path?name={value}").buildAndExpand("a=b");
* String encodedUri = uriComponents.encode().toUriString();
* </pre>