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

@ -34,7 +34,7 @@ import org.gradle.api.invocation.*
* dependencies (for example Hibernate v3 and v4).
* <p>
* The 'merge' extension should be used to define how projects are merged, for example:
* <pre>
* <pre class="code">
* configure(subprojects) {
* apply plugin: MergePlugin
* }

View File

@ -23,7 +23,7 @@ package org.springframework.beans.factory.aspectj;
*
* The subaspect of this aspect doesn't need to include any AOP constructs.
* For example, here is a subaspect that configures the {@code PricingStrategyClient} objects.
* <pre>
* <pre class="code">
* aspect PricingStrategyDependencyInjectionAspect
* extends GenericInterfaceDrivenDependencyInjectionAspect<PricingStrategyClient> {
* private PricingStrategy pricingStrategy;

View File

@ -44,7 +44,7 @@ import static org.springframework.beans.PropertyDescriptorUtils.*;
* Decorator for a standard {@link BeanInfo} object, e.g. as created by
* {@link Introspector#getBeanInfo(Class)}, designed to discover and register static
* and/or non-void returning setter methods. For example:
* <pre>{@code
* <pre class="code">
* public class Bean {
* private Foo foo;
*
@ -56,7 +56,7 @@ import static org.springframework.beans.PropertyDescriptorUtils.*;
* this.foo = foo;
* return this;
* }
* }}</pre>
* }</pre>
* The standard JavaBeans {@code Introspector} will discover the {@code getFoo} read
* method, but will bypass the {@code #setFoo(Foo)} write method, because its non-void
* returning signature does not comply with the JavaBeans specification.

View File

@ -34,7 +34,7 @@ import org.springframework.core.io.Resource;
* <p>The mapping file should be in the following format, as specified by the
* Java Activation Framework:
*
* <pre>
* <pre class="code">
* # map text/html to .htm and .html files
* text/html html htm HTML HTM</pre>
*

View File

@ -74,15 +74,12 @@ class AnnotationDrivenCacheBeanDefinitionParser implements BeanDefinitionParser
/**
* Registers a
* <pre>
* <pre class="code">
* <bean id="cacheAspect" class="org.springframework.cache.aspectj.AnnotationCacheAspect" factory-method="aspectOf">
* <property name="cacheManager" ref="cacheManager"/>
* <property name="keyGenerator" ref="keyGenerator"/>
* </bean>
*
* </pre>
* @param element
* @param parserContext
*/
private void registerCacheAspect(Element element, ParserContext parserContext) {
if (!parserContext.getRegistry().containsBeanDefinition(CACHE_ASPECT_BEAN_NAME)) {

View File

@ -54,7 +54,7 @@ import org.springframework.util.Assert;
*
* <p>Usage example:
*
* <pre>
* <pre class="code">
* GenericApplicationContext ctx = new GenericApplicationContext();
* XmlBeanDefinitionReader xmlReader = new XmlBeanDefinitionReader(ctx);
* xmlReader.loadBeanDefinitions(new ClassPathResource("applicationContext.xml"));

View File

@ -31,7 +31,7 @@ import org.springframework.util.ClassUtils;
* <p><b>NOTE:</b> On JBoss 6.0, to avoid the container loading the classes before the
* application actually starts, one needs to add a <tt>WEB-INF/jboss-scanning.xml</tt>
* file to the application archive - with the following content:
* <pre>&lt;scanning xmlns="urn:jboss:scanning:1.0"/&gt;</pre>
* <pre class="code">&lt;scanning xmlns="urn:jboss:scanning:1.0"/&gt;</pre>
*
* <p>Thanks to Ales Justin and Marius Bogoevici for the initial prototype.
*

View File

@ -31,7 +31,7 @@ import org.springframework.aop.TargetSource;
*
* <p>Example:
*
* <pre>
* <pre class="code">
* &lt;bean id="queueConnectionFactoryTarget" class="org.springframework.jndi.JndiObjectTargetSource"&gt;
* &lt;property name="jndiName" value="JmsQueueConnectionFactory"/&gt;
* &lt;property name="lookupOnStartup" value="false"/&gt;

View File

@ -154,7 +154,7 @@ public final class Handle {
* Returns the textual representation of this handle. The textual
* representation is:
*
* <pre>
* <pre class="code">
* owner '.' name desc ' ' '(' tag ')'
* </pre>
*

View File

@ -449,7 +449,7 @@ public abstract class MethodVisitor {
* constant types, implementations of this method should check for
* unexpected constant types, like this:
*
* <pre>
* <pre class="code">
* if (cst instanceof Integer) {
* // ...
* } else if (cst instanceof Float) {

View File

@ -111,7 +111,7 @@ public abstract class GenericTypeResolver {
* method for {@code creatProxy()} and an {@code Object[]} array containing
* {@code MyService.class}, {@code resolveReturnTypeForGenericMethod()} will
* infer that the target return type is {@code MyService}.
* <pre>{@code public static <T> T createProxy(Class<T> clazz)}</pre>
* <pre class="code">{@code public static <T> T createProxy(Class<T> clazz)}</pre>
* <h4>Possible Return Values</h4>
* <ul>
* <li>the target return type, if it can be inferred</li>

View File

@ -102,7 +102,7 @@ public interface Environment extends PropertyResolver {
* explicit active profiles, whether one or more of the given profiles is included in
* the set of default profiles. If a profile begins with '!' the logic is inverted,
* i.e. the method will return true if the given profile is <em>not</em> active. For
* example, <pre>env.acceptsProfiles("p1", "!p2")</pre> will return true if profile
* example, <pre class="code">env.acceptsProfiles("p1", "!p2")</pre> will return true if profile
* 'p1' is active or 'p2' is not active.
* @throws IllegalArgumentException if called with zero arguments
* @throws IllegalArgumentException if any profile is null, empty or whitespace-only

View File

@ -72,7 +72,7 @@ import org.springframework.util.StringUtils;
* <p><b>Ant-style Patterns:</b>
*
* <p>When the path location contains an Ant-style pattern, e.g.:
* <pre>
* <pre class="code">
* /WEB-INF/*-context.xml
* com/mycompany/**&#47;applicationContext.xml
* file:C:/some/path/*-context.xml
@ -143,9 +143,9 @@ import org.springframework.util.StringUtils;
*
* <p><b>WARNING:</b> Ant-style patterns with "classpath:" resources are not
* guaranteed to find matching resources if the root package to search is available
* in multiple class path locations. This is because a resource such as<pre>
* in multiple class path locations. This is because a resource such as<pre class="code">
* com/mycompany/package1/service-context.xml
* </pre>may be in only one location, but when a path such as<pre>
* </pre>may be in only one location, but when a path such as<pre class="code">
* classpath:com/mycompany/**&#47;service-context.xml
* </pre>is used to try to resolve it, the resolver will work off the (first) URL
* returned by {@code getResource("com/mycompany");}. If this base package

View File

@ -87,7 +87,7 @@ public abstract class StringUtils {
/**
* Check that the given CharSequence is neither {@code null} nor of length 0.
* Note: Will return {@code true} for a CharSequence that purely consists of whitespace.
* <p><pre>
* <p><pre class="code">
* StringUtils.hasLength(null) = false
* StringUtils.hasLength("") = false
* StringUtils.hasLength(" ") = true
@ -116,7 +116,7 @@ public abstract class StringUtils {
* Check whether the given CharSequence has actual text.
* More specifically, returns {@code true} if the string not {@code null},
* its length is greater than 0, and it contains at least one non-whitespace character.
* <p><pre>
* <p><pre class="code">
* StringUtils.hasText(null) = false
* StringUtils.hasText("") = false
* StringUtils.hasText(" ") = false

View File

@ -29,7 +29,7 @@ public interface ExpressionParser {
/**
* Parse the expression string and return an Expression object you can use for repeated evaluation.
* <p>Some examples:
* <pre>
* <pre class="code">
* 3 + 4
* name.firstName
* </pre>
@ -42,7 +42,7 @@ public interface ExpressionParser {
/**
* Parse the expression string and return an Expression object you can use for repeated evaluation.
* <p>Some examples:
* <pre>
* <pre class="code">
* 3 + 4
* name.firstName
* </pre>

View File

@ -29,7 +29,7 @@ public interface ParserContext {
* Whether or not the expression being parsed is a template. A template expression consists of literal text that can
* be mixed with evaluatable blocks. Some examples:
*
* <pre>
* <pre class="code">
* Some literal text
* Hello #{name.firstName}!
* #{3 + 4}

View File

@ -25,7 +25,7 @@ import java.text.MessageFormat;
* <p>
* When a message is formatted, it will have this kind of form
*
* <pre>
* <pre class="code">
* EL1004E: (pos 34): Type cannot be found 'String'
* </pre>
*

View File

@ -24,7 +24,7 @@ import org.springframework.jdbc.datasource.init.ResourceDatabasePopulator;
* A builder that provides a convenient API for constructing an embedded database.
*
* <p>Usage example:
* <pre>
* <pre class="code">
* EmbeddedDatabaseBuilder builder = new EmbeddedDatabaseBuilder();
* EmbeddedDatabase db = builder.setType(H2).addScript("schema.sql").addScript("data.sql").build();
* db.shutdown();

View File

@ -41,7 +41,7 @@ import org.springframework.transaction.support.TransactionSynchronizationManager
* DataSources are defined as individual Spring beans with names
* "myRepeatableReadDataSource", "mySerializableDataSource" and "myDefaultDataSource":
*
* <pre>
* <pre class="code">
* &lt;bean id="dataSourceRouter" class="org.springframework.jdbc.datasource.lookup.IsolationLevelDataSourceRouter"&gt;
* &lt;property name="targetDataSources"&gt;
* &lt;map&gt;
@ -57,7 +57,7 @@ import org.springframework.transaction.support.TransactionSynchronizationManager
* names for a standard JNDI lookup. This allows for a single concise definition
* without the need for separate DataSource bean definitions.
*
* <pre>
* <pre class="code">
* &lt;bean id="dataSourceRouter" class="org.springframework.jdbc.datasource.lookup.IsolationLevelDataSourceRouter"&gt;
* &lt;property name="targetDataSources"&gt;
* &lt;map&gt;
@ -74,7 +74,7 @@ import org.springframework.transaction.support.TransactionSynchronizationManager
* (By default, JtaTransactionManager will only accept a default isolation level
* because of the lack of isolation level support in standard JTA itself.)
*
* <pre>
* <pre class="code">
* &lt;bean id="transactionManager" class="org.springframework.transaction.jta.JtaTransactionManager"&gt;
* &lt;property name="allowCustomIsolationLevels" value="true"/&gt;
* &lt;/bean&gt;</pre>

View File

@ -35,7 +35,7 @@ import org.springframework.beans.factory.InitializingBean;
* definition, as the list element for the "filterDefinitions" bean property.
* For example:
*
* <pre>
* <pre class="code">
* &lt;bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"&gt;
* ...
* &lt;property name="filterDefinitions"&gt;

View File

@ -36,7 +36,7 @@ import org.springframework.transaction.support.TransactionSynchronizationManager
* Hibernate's own {@code SessionFactory.getCurrentSession()} method, to be
* able to detect a thread-bound Session. Typically, the code will look like as follows:
*
* <pre>
* <pre class="code">
* public void doSomeDataAccessAction() {
* Session session = this.sessionFactory.getCurrentSession();
* ...

View File

@ -445,7 +445,7 @@ public class LocalSessionFactoryBean extends AbstractSessionFactoryBean implemen
* This configuration setting corresponds to the &lt;class-cache&gt; entry
* in the "hibernate.cfg.xml" configuration format.
* <p>For example:
* <pre>
* <pre class="code">
* &lt;property name="entityCacheStrategies"&gt;
* &lt;props&gt;
* &lt;prop key="com.mycompany.Customer"&gt;read-write&lt;/prop&gt;
@ -465,7 +465,7 @@ public class LocalSessionFactoryBean extends AbstractSessionFactoryBean implemen
* This configuration setting corresponds to the &lt;collection-cache&gt; entry
* in the "hibernate.cfg.xml" configuration format.
* <p>For example:
* <pre>
* <pre class="code">
* &lt;property name="collectionCacheStrategies"&gt;
* &lt;props&gt;
* &lt;prop key="com.mycompany.Order.items">read-write&lt;/prop&gt;

View File

@ -28,7 +28,7 @@ import org.springframework.beans.factory.InitializingBean;
* definition, as list element for the "typeDefinitions" bean property.
* For example:
*
* <pre>
* <pre class="code">
* &lt;bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"&gt;
* ...
* &lt;property name="typeDefinitions"&gt;

View File

@ -30,7 +30,7 @@ import org.springframework.aop.support.AopUtils;
*
* <p>Usage example:
*
* <pre>
* <pre class="code">
* &lt;bean id=&quot;sessionFactory&quot; class=&quot;org.springframework.orm.hibernate3.LocalSessionFactoryBean&quot;&gt;
* ...
* &lt;property name=&quot;entityInterceptor&quot;&gt;

View File

@ -81,7 +81,7 @@ import org.springframework.util.CollectionUtils;
*
* <p>For example, in case of <a href="http://www.jpox.org">JPOX</a>:
*
* <p><pre>
* <p><pre class="code">
* &lt;bean id="persistenceManagerFactory" class="org.jpox.PersistenceManagerFactoryImpl" destroy-method="close"&gt;
* &lt;property name="connectionFactory" ref="dataSource"/&gt;
* &lt;property name="nontransactionalRead" value="true"/&gt;

View File

@ -39,7 +39,7 @@ import org.springframework.web.client.support.RestGatewaySupport;
* actual running server.
*
* <p>Below is an example:
* <pre>
* <pre class="code">
* RestTemplate restTemplate = new RestTemplate()
* MockRestServiceServer mockServer = MockRestServiceServer.createServer(restTemplate);
*

View File

@ -32,7 +32,7 @@ import org.springframework.util.Assert;
*
* <p>Below is an example:
*
* <pre>
* <pre class="code">
* static imports:
* MockMvcBuilders.*, MockMvcRequestBuilders.*, MockMvcResultMatchers.*
*

View File

@ -31,7 +31,7 @@ public interface ResultActions {
/**
* Provide an expectation. For example:
* <pre>
* <pre class="code">
* static imports: MockMvcRequestBuilders.*, MockMvcResultMatchers.*
*
* mockMvc.perform(get("/person/1"))
@ -52,7 +52,7 @@ public interface ResultActions {
/**
* Provide a general action. For example:
* <pre>
* <pre class="code">
* static imports: MockMvcRequestBuilders.*, MockMvcResultMatchers.*
*
* mockMvc.perform(get("/form")).andDo(print());

View File

@ -25,7 +25,7 @@ package org.springframework.test.web.servlet;
*
* <p>Example:
*
* <pre>
* <pre class="code">
* static imports: MockMvcRequestBuilders.*, MockMvcResultHandlers.*
*
* mockMvc.perform(get("/form")).andDo(print());

View File

@ -24,7 +24,7 @@ package org.springframework.test.web.servlet;
*
* <p>Example:
*
* <pre>
* <pre class="code">
* static imports: MockMvcRequestBuilders.*, MockMvcResultMatchers.*
*
* mockMvc.perform(get("/form"))

View File

@ -117,14 +117,14 @@ public abstract class MockMvcRequestBuilders {
* {@link MvcResult} of the request that started async processing.
*
* <p>Usage involves performing one request first that starts async processing:
* <pre>
* <pre class="code">
* MvcResult mvcResult = this.mockMvc.perform(get("/1"))
* .andExpect(request().asyncStarted())
* .andReturn();
* </pre>
*
* <p>And then performing the async dispatch re-using the {@code MvcResult}:
* <pre>
* <pre class="code">
* this.mockMvc.perform(asyncDispatch(mvcResult))
* .andExpect(status().isOk())
* .andExpect(content().contentType(MediaType.APPLICATION_JSON))

View File

@ -117,7 +117,7 @@ public class ContentResultMatchers {
/**
* Assert the response body content with a Hamcrest {@link Matcher}.
* <pre>
* <pre class="code">
* mockMvc.perform(get("/path"))
* .andExpect(content(containsString("text")));
* </pre>

View File

@ -32,7 +32,7 @@ import org.springframework.util.Assert;
* agnostic of the actual testing framework in use.
*
* @author Sam Brannen
* @author Juergen Hoeller
* @author Juergen Hoellereasymock
* @since 2.5
*/
public class TestContext extends AttributeAccessorSupport {

View File

@ -44,11 +44,11 @@ public abstract class AssertionErrors {
* values to be added to the message.
*
* <p>For example given:
* <pre>
* <pre class="code">
* assertEquals("Response header [" + name + "]", actual, expected);
* </pre>
* <p>The resulting message is:
* <pre>
* <pre class="code">
* Response header [Accept] expected:&lt;application/json&gt; but was:&lt;text/plain&gt;
* </pre>
*
@ -76,7 +76,7 @@ public abstract class AssertionErrors {
/**
* Assert two objects are equal raise an {@link AssertionError} if not.
* <p>For example:
* <pre>
* <pre class="code">
* assertEquals("Response header [" + name + "]", actual, expected);
* </pre>
*

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>

View File

@ -31,7 +31,7 @@ import org.springframework.util.CollectionUtils;
* interface to map from the current PortletMode to request handler beans.
*
* <p>The bean configuration for this mapping will look something like this:
* <pre>
* <pre class="code">
* &lt;bean id="portletModeHandlerMapping" class="org.springframework.web.portlet.handler.PortletModeHandlerMapping"&gt;
* &lt;property name="portletModeMap"&gt;
* &lt;map&gt;

View File

@ -61,7 +61,7 @@ import org.springframework.web.portlet.util.PortletUtils;
*
* <p><b>Example:</b>
*
* <pre>&lt;bean id="wrappingController" class="org.springframework.web.portlet.mvc.PortletWrappingController"&gt;
* <pre class="code">&lt;bean id="wrappingController" class="org.springframework.web.portlet.mvc.PortletWrappingController"&gt;
* &lt;property name="portletClass"&gt;
* &lt;value&gt;org.springframework.web.portlet.sample.HelloWorldPortlet&lt;/value&gt;
* &lt;/property&gt;

View File

@ -83,7 +83,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.tiles3.TilesConfigurer">
* &lt;property name="definitions">
* &lt;list>

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>

View File

@ -74,7 +74,7 @@ public interface WebSocketSession {
/**
* Close the WebSocket connection with status 1000, i.e. equivalent to:
* <pre>
* <pre class="code">
* session.close(CloseStatus.NORMAL);
* </pre>
*/