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

@@ -38,7 +38,7 @@ import org.springframework.web.util.WebUtils;
* <p><b>Example:</b> web.xml, mapping all "/myservlet" requests to a Spring dispatcher.
* Also defines a custom "myServlet", but <i>without</i> servlet mapping.
*
* <pre>
* <pre class="code">
* &lt;servlet&gt;
* &lt;servlet-name&gt;myServlet&lt;/servlet-name&gt;
* &lt;servlet-class&gt;mypackage.TestServlet&lt;/servlet-class&gt;
@@ -59,7 +59,7 @@ import org.springframework.web.util.WebUtils;
* configured HandlerInterceptor chain (e.g. an OpenSessionInViewInterceptor).
* From the servlet point of view, everything will work as usual.
*
* <pre>
* <pre class="code">
* &lt;bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"&gt;
* &lt;property name="interceptors"&gt;
* &lt;list&gt;

View File

@@ -48,7 +48,7 @@ import org.springframework.web.servlet.ModelAndView;
* through the configured HandlerInterceptor chain (e.g. an OpenSessionInViewInterceptor).
* From the Struts point of view, everything will work as usual.
*
* <pre>
* <pre class="code">
* &lt;bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"&gt;
* &lt;property name="interceptors"&gt;
* &lt;list&gt;

View File

@@ -36,7 +36,7 @@ import org.springframework.web.servlet.FlashMap;
* automatically propagated to the "output" FlashMap of the current request.
*
* <p>Example usage in an {@code @Controller}:
* <pre>
* <pre class="code">
* &#064;RequestMapping(value = "/accounts", method = RequestMethod.POST)
* public String handle(Account account, BindingResult result, RedirectAttributes redirectAttrs) {
* if (result.hasErrors()) {

View File

@@ -63,7 +63,7 @@ import org.springframework.web.util.UriUtils;
* is 'false'. When setting the URL value into a variable, escaping is not recommended.
*
* <p>Example usage:
* <pre>&lt;spring:url value="/url/path/{variableName}"&gt;
* <pre class="code">&lt;spring:url value="/url/path/{variableName}"&gt;
* &lt;spring:param name="variableName" value="more than JSTL c:url" /&gt;
* &lt;/spring:url&gt;</pre>
* Results in:

View File

@@ -37,7 +37,7 @@ import org.springframework.web.context.ServletContextAware;
* The simplest way to use this class is to specify just a "templateLoaderPath";
* you do not need any further configuration then.
*
* <pre>
* <pre class="code">
* &lt;bean id="freemarkerConfig" class="org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer"&gt;
* &lt;property name="templateLoaderPath"&gt;&lt;value&gt;/WEB-INF/freemarker/&lt;/value>&lt;/property&gt;
* &lt;/bean&gt;</pre>
@@ -58,7 +58,7 @@ import org.springframework.web.context.ServletContextAware;
* reference the "spring.ftl" macro library (contained in this package and thus
* in spring.jar) like this:
*
* <pre>
* <pre class="code">
* &lt;#import "/spring.ftl" as spring/&gt;
* &lt;@spring.bind "person.age"/&gt;
* age is ${spring.status.value}</pre>

View File

@@ -37,7 +37,7 @@ import org.springframework.util.CollectionUtils;
* view class. For example you might add the following code to your
* {@code Controller}:
*
* <pre>
* <pre class="code">
* Map<String, Object> model = new HashMap<String, Object>();
* model.put("format", "pdf");</pre>
*

View File

@@ -137,7 +137,7 @@ public class MappingJackson2JsonView extends AbstractView {
/**
* Whether to use the default pretty printer 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);
* </pre>

View File

@@ -137,7 +137,7 @@ public class MappingJacksonJsonView extends AbstractView {
/**
* Whether to use the default pretty printer 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);
* </pre>

View File

@@ -91,7 +91,7 @@ import org.springframework.web.context.ServletContextAware;
*
* <p>A typical TilesConfigurer bean definition looks as follows:
*
* <pre>
* <pre class="code">
* &lt;bean id="tilesConfigurer" class="org.springframework.web.servlet.view.tiles2.TilesConfigurer">
* &lt;property name="definitions">
* &lt;list>