Merge branch '5.3.x'
This commit is contained in:
commit
3dc84c2d92
|
@ -61,7 +61,7 @@ public class BeanNameAutoProxyCreator extends AbstractAutoProxyCreator {
|
|||
* FactoryBean will get proxied. This default behavior applies as of Spring 2.0.
|
||||
* If you intend to proxy a FactoryBean instance itself (a rare use case, but
|
||||
* Spring 1.2's default behavior), specify the bean name of the FactoryBean
|
||||
* including the factory-bean prefix "&": e.g. "&myFactoryBean".
|
||||
* including the factory-bean prefix "&": e.g. "&myFactoryBean".
|
||||
* @see org.springframework.beans.factory.FactoryBean
|
||||
* @see org.springframework.beans.factory.BeanFactory#FACTORY_BEAN_PREFIX
|
||||
*/
|
||||
|
|
|
@ -75,18 +75,18 @@ import org.springframework.util.StringUtils;
|
|||
*
|
||||
* def reader = new GroovyBeanDefinitionReader(myApplicationContext)
|
||||
* reader.beans {
|
||||
* dataSource(BasicDataSource) { // <--- invokeMethod
|
||||
* dataSource(BasicDataSource) { // <--- invokeMethod
|
||||
* driverClassName = "org.hsqldb.jdbcDriver"
|
||||
* url = "jdbc:hsqldb:mem:grailsDB"
|
||||
* username = "sa" // <-- setProperty
|
||||
* username = "sa" // <-- setProperty
|
||||
* password = ""
|
||||
* settings = [mynew:"setting"]
|
||||
* }
|
||||
* sessionFactory(SessionFactory) {
|
||||
* dataSource = dataSource // <-- getProperty for retrieving references
|
||||
* dataSource = dataSource // <-- getProperty for retrieving references
|
||||
* }
|
||||
* myService(MyService) {
|
||||
* nestedBean = { AnotherBean bean -> // <-- setProperty with closure for nested bean
|
||||
* nestedBean = { AnotherBean bean -> // <-- setProperty with closure for nested bean
|
||||
* dataSource = dataSource
|
||||
* }
|
||||
* }
|
||||
|
@ -113,7 +113,7 @@ import org.springframework.util.StringUtils;
|
|||
* dataSource = dataSource
|
||||
* }
|
||||
* myService(MyService) {
|
||||
* nestedBean = { AnotherBean bean ->
|
||||
* nestedBean = { AnotherBean bean ->
|
||||
* dataSource = dataSource
|
||||
* }
|
||||
* }
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2020 the original author or authors.
|
||||
* Copyright 2002-2021 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -129,7 +129,7 @@ import org.springframework.stereotype.Component;
|
|||
* @Configuration
|
||||
* public class AppConfig {
|
||||
*
|
||||
* @Autowired Environment env;
|
||||
* @Autowired Environment env;
|
||||
*
|
||||
* @Bean
|
||||
* public MyBean myBean() {
|
||||
|
@ -149,7 +149,7 @@ import org.springframework.stereotype.Component;
|
|||
* @PropertySource("classpath:/com/acme/app.properties")
|
||||
* public class AppConfig {
|
||||
*
|
||||
* @Inject Environment env;
|
||||
* @Inject Environment env;
|
||||
*
|
||||
* @Bean
|
||||
* public MyBean myBean() {
|
||||
|
@ -170,7 +170,7 @@ import org.springframework.stereotype.Component;
|
|||
* @PropertySource("classpath:/com/acme/app.properties")
|
||||
* public class AppConfig {
|
||||
*
|
||||
* @Value("${bean.name}") String beanName;
|
||||
* @Value("${bean.name}") String beanName;
|
||||
*
|
||||
* @Bean
|
||||
* public MyBean myBean() {
|
||||
|
@ -297,7 +297,7 @@ import org.springframework.stereotype.Component;
|
|||
* @ImportResource("classpath:/com/acme/database-config.xml")
|
||||
* public class AppConfig {
|
||||
*
|
||||
* @Inject DataSource dataSource; // from XML
|
||||
* @Inject DataSource dataSource; // from XML
|
||||
*
|
||||
* @Bean
|
||||
* public MyBean myBean() {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
* Copyright 2002-2021 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -98,7 +98,7 @@ import java.lang.annotation.Target;
|
|||
* @EnableAspectJAutoProxy
|
||||
* public class AppConfig {
|
||||
*
|
||||
* // no explicit @Bean definitions required
|
||||
* // no explicit @Bean definitions required
|
||||
* }</pre>
|
||||
*
|
||||
* <b>Note: {@code @EnableAspectJAutoProxy} applies to its local application context only,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
* Copyright 2002-2021 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -46,18 +46,18 @@ import org.springframework.lang.Nullable;
|
|||
*
|
||||
* def context = new GenericGroovyApplicationContext()
|
||||
* context.reader.beans {
|
||||
* dataSource(BasicDataSource) { // <--- invokeMethod
|
||||
* dataSource(BasicDataSource) { // <--- invokeMethod
|
||||
* driverClassName = "org.hsqldb.jdbcDriver"
|
||||
* url = "jdbc:hsqldb:mem:grailsDB"
|
||||
* username = "sa" // <-- setProperty
|
||||
* username = "sa" // <-- setProperty
|
||||
* password = ""
|
||||
* settings = [mynew:"setting"]
|
||||
* }
|
||||
* sessionFactory(SessionFactory) {
|
||||
* dataSource = dataSource // <-- getProperty for retrieving references
|
||||
* dataSource = dataSource // <-- getProperty for retrieving references
|
||||
* }
|
||||
* myService(MyService) {
|
||||
* nestedBean = { AnotherBean bean -> // <-- setProperty with closure for nested bean
|
||||
* nestedBean = { AnotherBean bean -> // <-- setProperty with closure for nested bean
|
||||
* dataSource = dataSource
|
||||
* }
|
||||
* }
|
||||
|
@ -84,7 +84,7 @@ import org.springframework.lang.Nullable;
|
|||
* dataSource = dataSource
|
||||
* }
|
||||
* myService(MyService) {
|
||||
* nestedBean = { AnotherBean bean ->
|
||||
* nestedBean = { AnotherBean bean ->
|
||||
* dataSource = dataSource
|
||||
* }
|
||||
* }
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2020 the original author or authors.
|
||||
* Copyright 2002-2021 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -229,7 +229,7 @@ public class ReloadableResourceBundleMessageSource extends AbstractResourceBased
|
|||
* for a Locale, after merging all specified resource bundles.
|
||||
* Either fetches the holder from the cache or freshly loads it.
|
||||
* <p>Only used when caching resource bundle contents forever, i.e.
|
||||
* with cacheSeconds < 0. Therefore, merged properties are always
|
||||
* with cacheSeconds < 0. Therefore, merged properties are always
|
||||
* cached forever.
|
||||
*/
|
||||
protected PropertiesHolder getMergedProperties(Locale locale) {
|
||||
|
|
|
@ -37,7 +37,7 @@ import org.springframework.util.StringValueResolver;
|
|||
* as {@code DefaultConversionService} exposes its own
|
||||
* {@link DefaultConversionService#addDefaultConverters addDefaultConverters} method.
|
||||
*
|
||||
* <p>Automatically registers formatters for JSR-354 Money & Currency, JSR-310 Date-Time
|
||||
* <p>Automatically registers formatters for JSR-354 Money & Currency, JSR-310 Date-Time
|
||||
* and/or Joda-Time 2.x, depending on the presence of the corresponding API on the classpath.
|
||||
*
|
||||
* @author Chris Beams
|
||||
|
@ -97,7 +97,7 @@ public class DefaultFormattingConversionService extends FormattingConversionServ
|
|||
|
||||
/**
|
||||
* Add formatters appropriate for most environments: including number formatters,
|
||||
* JSR-354 Money & Currency formatters, JSR-310 Date-Time and/or Joda-Time formatters,
|
||||
* JSR-354 Money & Currency formatters, JSR-310 Date-Time and/or Joda-Time formatters,
|
||||
* depending on the presence of the corresponding API on the classpath.
|
||||
* @param formatterRegistry the service to register default formatters with
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
* Copyright 2002-2021 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -33,7 +33,7 @@ package org.springframework.validation;
|
|||
* wholly of whitespace), and that any password that is present is
|
||||
* at least {@code 'MINIMUM_PASSWORD_LENGTH'} characters in length.
|
||||
*
|
||||
* <pre class="code"> public class UserLoginValidator implements Validator {
|
||||
* <pre class="code">public class UserLoginValidator implements Validator {
|
||||
*
|
||||
* private static final int MINIMUM_PASSWORD_LENGTH = 6;
|
||||
*
|
||||
|
@ -46,7 +46,7 @@ package org.springframework.validation;
|
|||
* ValidationUtils.rejectIfEmptyOrWhitespace(errors, "password", "field.required");
|
||||
* UserLogin login = (UserLogin) target;
|
||||
* if (login.getPassword() != null
|
||||
* && login.getPassword().trim().length() < MINIMUM_PASSWORD_LENGTH) {
|
||||
* && login.getPassword().trim().length() < MINIMUM_PASSWORD_LENGTH) {
|
||||
* errors.rejectValue("password", "field.min.length",
|
||||
* new Object[]{Integer.valueOf(MINIMUM_PASSWORD_LENGTH)},
|
||||
* "The password must be at least [" + MINIMUM_PASSWORD_LENGTH + "] characters in length.");
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
* Copyright 2002-2021 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -110,7 +110,7 @@ import org.springframework.util.StringUtils;
|
|||
* evaluate true:
|
||||
*
|
||||
* <pre class="code">
|
||||
* CommandLinePropertySource<?> ps = ...
|
||||
* CommandLinePropertySource<?> ps = ...
|
||||
* assert ps.containsProperty("o1") == true;
|
||||
* assert ps.containsProperty("o2") == true;
|
||||
* assert ps.containsProperty("o3") == false;
|
||||
|
@ -149,7 +149,7 @@ import org.springframework.util.StringUtils;
|
|||
* will evaluate true:
|
||||
*
|
||||
* <pre class="code">
|
||||
* CommandLinePropertySource<?> ps = ...
|
||||
* CommandLinePropertySource<?> ps = ...
|
||||
* assert ps.containsProperty("o1") == true;
|
||||
* assert ps.containsProperty("o2") == true;
|
||||
* assert ps.containsProperty("nonOptionArgs") == true;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
* Copyright 2002-2021 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -42,7 +42,7 @@ import org.springframework.util.StringUtils;
|
|||
* parser.accepts("option1");
|
||||
* parser.accepts("option2").withRequiredArg();
|
||||
* OptionSet options = parser.parse(args);
|
||||
* PropertySource<?> ps = new JOptCommandLinePropertySource(options);
|
||||
* PropertySource<?> ps = new JOptCommandLinePropertySource(options);
|
||||
* // ...
|
||||
* }</pre>
|
||||
*
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2020 the original author or authors.
|
||||
* Copyright 2002-2021 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -66,7 +66,7 @@ import org.springframework.util.StringUtils;
|
|||
* <h3>Typical usage</h3>
|
||||
* <pre class="code">
|
||||
* public static void main(String[] args) {
|
||||
* PropertySource<?> ps = new SimpleCommandLinePropertySource(args);
|
||||
* PropertySource<?> ps = new SimpleCommandLinePropertySource(args);
|
||||
* // ...
|
||||
* }</pre>
|
||||
*
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
* Copyright 2002-2021 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -138,7 +138,7 @@ import org.springframework.context.annotation.Import;
|
|||
* }
|
||||
*
|
||||
* @Bean
|
||||
* public JmsListenerContainerFactory<?> myJmsListenerContainerFactory() {
|
||||
* public JmsListenerContainerFactory<?> myJmsListenerContainerFactory() {
|
||||
* // factory settings
|
||||
* }
|
||||
*
|
||||
|
@ -184,7 +184,7 @@ import org.springframework.context.annotation.Import;
|
|||
* }
|
||||
*
|
||||
* @Bean
|
||||
* public JmsListenerEndpointRegistry<?> myJmsListenerEndpointRegistry() {
|
||||
* public JmsListenerEndpointRegistry<?> myJmsListenerEndpointRegistry() {
|
||||
* // registry configuration
|
||||
* }
|
||||
*
|
||||
|
@ -246,7 +246,7 @@ import org.springframework.context.annotation.Import;
|
|||
* }
|
||||
*
|
||||
* @Bean
|
||||
* public JmsListenerContainerFactory<?> anotherJmsListenerContainerFactory() {
|
||||
* public JmsListenerContainerFactory<?> anotherJmsListenerContainerFactory() {
|
||||
* // ...
|
||||
* }
|
||||
*
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
* Copyright 2002-2021 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -67,7 +67,7 @@ public abstract class AbstractMessageCondition<T extends AbstractMessageConditio
|
|||
|
||||
/**
|
||||
* The notation to use when printing discrete items of content.
|
||||
* For example " || " for URL patterns or " && " for param expressions.
|
||||
* For example " || " for URL patterns or " && " for param expressions.
|
||||
*/
|
||||
protected abstract String getToStringInfix();
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2020 the original author or authors.
|
||||
* Copyright 2002-2021 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -606,7 +606,7 @@ public interface HibernateOperations {
|
|||
* @param firstResult the index of the first result object to be retrieved
|
||||
* (numbered from 0)
|
||||
* @param maxResults the maximum number of result objects to retrieve
|
||||
* (or <=0 for no limit)
|
||||
* (or <=0 for no limit)
|
||||
* @return a {@link List} containing 0 or more persistent instances
|
||||
* @throws DataAccessException in case of Hibernate errors
|
||||
* @see DetachedCriteria#getExecutableCriteria(org.hibernate.Session)
|
||||
|
@ -643,7 +643,7 @@ public interface HibernateOperations {
|
|||
* @param firstResult the index of the first result object to be retrieved
|
||||
* (numbered from 0)
|
||||
* @param maxResults the maximum number of result objects to retrieve
|
||||
* (or <=0 for no limit)
|
||||
* (or <=0 for no limit)
|
||||
* @return a {@link List} containing 0 or more persistent instances
|
||||
* @throws DataAccessException in case of Hibernate errors
|
||||
* @see org.hibernate.criterion.Example#create(Object)
|
||||
|
@ -660,7 +660,7 @@ public interface HibernateOperations {
|
|||
* @param firstResult the index of the first result object to be retrieved
|
||||
* (numbered from 0)
|
||||
* @param maxResults the maximum number of result objects to retrieve
|
||||
* (or <=0 for no limit)
|
||||
* (or <=0 for no limit)
|
||||
* @return a {@link List} containing 0 or more persistent instances
|
||||
* @throws DataAccessException in case of Hibernate errors
|
||||
* @see org.hibernate.criterion.Example#create(Object)
|
||||
|
|
|
@ -285,21 +285,21 @@ public enum HttpStatus {
|
|||
I_AM_A_TEAPOT(418, Series.CLIENT_ERROR, "I'm a teapot"),
|
||||
/**
|
||||
* @deprecated See
|
||||
* <a href="https://tools.ietf.org/rfcdiff?difftype=--hwdiff&url2=draft-ietf-webdav-protocol-06.txt">
|
||||
* <a href="https://tools.ietf.org/rfcdiff?difftype=--hwdiff{@literal &}url2=draft-ietf-webdav-protocol-06.txt">
|
||||
* WebDAV Draft Changes</a>
|
||||
*/
|
||||
@Deprecated
|
||||
INSUFFICIENT_SPACE_ON_RESOURCE(419, Series.CLIENT_ERROR, "Insufficient Space On Resource"),
|
||||
/**
|
||||
* @deprecated See
|
||||
* <a href="https://tools.ietf.org/rfcdiff?difftype=--hwdiff&url2=draft-ietf-webdav-protocol-06.txt">
|
||||
* <a href="https://tools.ietf.org/rfcdiff?difftype=--hwdiff{@literal &}url2=draft-ietf-webdav-protocol-06.txt">
|
||||
* WebDAV Draft Changes</a>
|
||||
*/
|
||||
@Deprecated
|
||||
METHOD_FAILURE(420, Series.CLIENT_ERROR, "Method Failure"),
|
||||
/**
|
||||
* @deprecated
|
||||
* See <a href="https://tools.ietf.org/rfcdiff?difftype=--hwdiff&url2=draft-ietf-webdav-protocol-06.txt">
|
||||
* See <a href="https://tools.ietf.org/rfcdiff?difftype=--hwdiff{@literal &}url2=draft-ietf-webdav-protocol-06.txt">
|
||||
* WebDAV Draft Changes</a>
|
||||
*/
|
||||
@Deprecated
|
||||
|
|
|
@ -83,7 +83,7 @@ import org.springframework.util.xml.StaxUtils;
|
|||
* <li><a href="https://github.com/FasterXML/jackson-datatype-jdk8">jackson-datatype-jdk8</a>:
|
||||
* support for other Java 8 types like {@link java.util.Optional}</li>
|
||||
* <li><a href="https://github.com/FasterXML/jackson-datatype-jsr310">jackson-datatype-jsr310</a>:
|
||||
* support for Java 8 Date & Time API types</li>
|
||||
* support for Java 8 Date & Time API types</li>
|
||||
* <li><a href="https://github.com/FasterXML/jackson-module-kotlin">jackson-module-kotlin</a>:
|
||||
* support for Kotlin classes and data classes</li>
|
||||
* </ul>
|
||||
|
|
|
@ -62,54 +62,54 @@ import org.springframework.lang.Nullable;
|
|||
* <p>Example usage with
|
||||
* {@link MappingJackson2HttpMessageConverter}:
|
||||
*
|
||||
* <pre class="code">
|
||||
* <bean class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter">
|
||||
* <property name="objectMapper">
|
||||
* <bean class="org.springframework.http.converter.json.Jackson2ObjectMapperFactoryBean"
|
||||
* <pre class="code">{@code
|
||||
* <bean class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter">
|
||||
* <property name="objectMapper">
|
||||
* <bean class="org.springframework.http.converter.json.Jackson2ObjectMapperFactoryBean"
|
||||
* p:autoDetectFields="false"
|
||||
* p:autoDetectGettersSetters="false"
|
||||
* p:annotationIntrospector-ref="jaxbAnnotationIntrospector" />
|
||||
* </property>
|
||||
* </bean>
|
||||
* </pre>
|
||||
* </property>
|
||||
* </bean>
|
||||
* }</pre>
|
||||
*
|
||||
* <p>Example usage with MappingJackson2JsonView:
|
||||
*
|
||||
* <pre class="code">
|
||||
* <bean class="org.springframework.web.servlet.view.json.MappingJackson2JsonView">
|
||||
* <property name="objectMapper">
|
||||
* <bean class="org.springframework.http.converter.json.Jackson2ObjectMapperFactoryBean"
|
||||
* <pre class="code">{@code
|
||||
* <bean class="org.springframework.web.servlet.view.json.MappingJackson2JsonView">
|
||||
* <property name="objectMapper">
|
||||
* <bean class="org.springframework.http.converter.json.Jackson2ObjectMapperFactoryBean"
|
||||
* p:failOnEmptyBeans="false"
|
||||
* p:indentOutput="true">
|
||||
* <property name="serializers">
|
||||
* <array>
|
||||
* <bean class="org.mycompany.MyCustomSerializer" />
|
||||
* </array>
|
||||
* </property>
|
||||
* </bean>
|
||||
* </property>
|
||||
* </bean>
|
||||
* </pre>
|
||||
* <property name="serializers">
|
||||
* <array>
|
||||
* <bean class="org.mycompany.MyCustomSerializer" />
|
||||
* </array>
|
||||
* </property>
|
||||
* </bean>
|
||||
* </property>
|
||||
* </bean>
|
||||
* }</pre>
|
||||
*
|
||||
* <p>In case there are no specific setters provided (for some rarely used options),
|
||||
* you can still use the more general methods {@link #setFeaturesToEnable} and
|
||||
* {@link #setFeaturesToDisable}.
|
||||
*
|
||||
* <pre class="code">
|
||||
* <bean class="org.springframework.http.converter.json.Jackson2ObjectMapperFactoryBean">
|
||||
* <property name="featuresToEnable">
|
||||
* <array>
|
||||
* <util:constant static-field="com.fasterxml.jackson.databind.SerializationFeature.WRAP_ROOT_VALUE"/>
|
||||
* <util:constant static-field="com.fasterxml.jackson.databind.SerializationFeature.CLOSE_CLOSEABLE"/>
|
||||
* </array>
|
||||
* </property>
|
||||
* <property name="featuresToDisable">
|
||||
* <array>
|
||||
* <util:constant static-field="com.fasterxml.jackson.databind.MapperFeature.USE_ANNOTATIONS"/>
|
||||
* </array>
|
||||
* </property>
|
||||
* </bean>
|
||||
* </pre>
|
||||
* <pre class="code">{@code
|
||||
* <bean class="org.springframework.http.converter.json.Jackson2ObjectMapperFactoryBean">
|
||||
* <property name="featuresToEnable">
|
||||
* <array>
|
||||
* <util:constant static-field="com.fasterxml.jackson.databind.SerializationFeature.WRAP_ROOT_VALUE"/>
|
||||
* <util:constant static-field="com.fasterxml.jackson.databind.SerializationFeature.CLOSE_CLOSEABLE"/>
|
||||
* </array>
|
||||
* </property>
|
||||
* <property name="featuresToDisable">
|
||||
* <array>
|
||||
* <util:constant static-field="com.fasterxml.jackson.databind.MapperFeature.USE_ANNOTATIONS"/>
|
||||
* </array>
|
||||
* </property>
|
||||
* </bean>
|
||||
* }</pre>
|
||||
*
|
||||
* <p>It also automatically registers the following well-known modules if they are
|
||||
* detected on the classpath:
|
||||
|
@ -119,7 +119,7 @@ import org.springframework.lang.Nullable;
|
|||
* <li><a href="https://github.com/FasterXML/jackson-datatype-jdk8">jackson-datatype-jdk8</a>:
|
||||
* support for other Java 8 types like {@link java.util.Optional}</li>
|
||||
* <li><a href="https://github.com/FasterXML/jackson-datatype-jsr310">jackson-datatype-jsr310</a>:
|
||||
* support for Java 8 Date & Time API types</li>
|
||||
* support for Java 8 Date & Time API types</li>
|
||||
* <li><a href="https://github.com/FasterXML/jackson-module-kotlin">jackson-module-kotlin</a>:
|
||||
* support for Kotlin classes and data classes</li>
|
||||
* </ul>
|
||||
|
@ -127,11 +127,11 @@ import org.springframework.lang.Nullable;
|
|||
* <p>In case you want to configure Jackson's {@link ObjectMapper} with a custom {@link Module},
|
||||
* you can register one or more such Modules by class name via {@link #setModulesToInstall}:
|
||||
*
|
||||
* <pre class="code">
|
||||
* <bean class="org.springframework.http.converter.json.Jackson2ObjectMapperFactoryBean">
|
||||
* <property name="modulesToInstall" value="myapp.jackson.MySampleModule,myapp.jackson.MyOtherModule"/>
|
||||
* </bean
|
||||
* </pre>
|
||||
* <pre class="code">{@code
|
||||
* <bean class="org.springframework.http.converter.json.Jackson2ObjectMapperFactoryBean">
|
||||
* <property name="modulesToInstall" value="myapp.jackson.MySampleModule,myapp.jackson.MyOtherModule"/>
|
||||
* </bean
|
||||
* }</pre>
|
||||
*
|
||||
* <p>Compatible with Jackson 2.9 to 2.12, as of Spring 5.3.
|
||||
*
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
* Copyright 2002-2021 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -49,7 +49,7 @@ public abstract class HtmlUtils {
|
|||
|
||||
/**
|
||||
* Turn special characters into HTML character references.
|
||||
* <p>Handles complete character set defined in HTML 4.01 recommendation.
|
||||
* <p>Handles the complete character set defined in the HTML 4.01 recommendation.
|
||||
* <p>Escapes all special characters to their corresponding
|
||||
* entity reference (e.g. {@code <}).
|
||||
* <p>Reference:
|
||||
|
@ -65,7 +65,7 @@ public abstract class HtmlUtils {
|
|||
|
||||
/**
|
||||
* Turn special characters into HTML character references.
|
||||
* <p>Handles complete character set defined in HTML 4.01 recommendation.
|
||||
* <p>Handles the complete character set defined in the HTML 4.01 recommendation.
|
||||
* <p>Escapes all special characters to their corresponding
|
||||
* entity reference (e.g. {@code <}) at least as required by the
|
||||
* specified encoding. In other words, if a special character does
|
||||
|
@ -98,9 +98,9 @@ public abstract class HtmlUtils {
|
|||
|
||||
/**
|
||||
* Turn special characters into HTML character references.
|
||||
* <p>Handles complete character set defined in HTML 4.01 recommendation.
|
||||
* <p>Handles the complete character set defined in the HTML 4.01 recommendation.
|
||||
* <p>Escapes all special characters to their corresponding numeric
|
||||
* reference in decimal format (&#<i>Decimal</i>;).
|
||||
* reference in decimal format (&#<i>Decimal</i>;).
|
||||
* <p>Reference:
|
||||
* <a href="https://www.w3.org/TR/html4/sgml/entities.html">
|
||||
* https://www.w3.org/TR/html4/sgml/entities.html
|
||||
|
@ -114,9 +114,9 @@ public abstract class HtmlUtils {
|
|||
|
||||
/**
|
||||
* Turn special characters into HTML character references.
|
||||
* <p>Handles complete character set defined in HTML 4.01 recommendation.
|
||||
* <p>Handles the complete character set defined in the HTML 4.01 recommendation.
|
||||
* <p>Escapes all special characters to their corresponding numeric
|
||||
* reference in decimal format (&#<i>Decimal</i>;) at least as required by the
|
||||
* reference in decimal format (&#<i>Decimal</i>;) at least as required by the
|
||||
* specified encoding. In other words, if a special character does
|
||||
* not have to be escaped for the given encoding, it may not be.
|
||||
* <p>Reference:
|
||||
|
@ -148,9 +148,9 @@ public abstract class HtmlUtils {
|
|||
|
||||
/**
|
||||
* Turn special characters into HTML character references.
|
||||
* <p>Handles complete character set defined in HTML 4.01 recommendation.
|
||||
* <p>Handles the complete character set defined in the HTML 4.01 recommendation.
|
||||
* <p>Escapes all special characters to their corresponding numeric
|
||||
* reference in hex format (&#x<i>Hex</i>;).
|
||||
* reference in hex format (&#x<i>Hex</i>;).
|
||||
* <p>Reference:
|
||||
* <a href="https://www.w3.org/TR/html4/sgml/entities.html">
|
||||
* https://www.w3.org/TR/html4/sgml/entities.html
|
||||
|
@ -164,9 +164,9 @@ public abstract class HtmlUtils {
|
|||
|
||||
/**
|
||||
* Turn special characters into HTML character references.
|
||||
* <p>Handles complete character set defined in HTML 4.01 recommendation.
|
||||
* <p>Handles the complete character set defined in the HTML 4.01 recommendation.
|
||||
* <p>Escapes all special characters to their corresponding numeric
|
||||
* reference in hex format (&#x<i>Hex</i>;) at least as required by the
|
||||
* reference in hex format (&#x<i>Hex</i>;) at least as required by the
|
||||
* specified encoding. In other words, if a special character does
|
||||
* not have to be escaped for the given encoding, it may not be.
|
||||
* <p>Reference:
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2020 the original author or authors.
|
||||
* Copyright 2002-2021 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -92,7 +92,7 @@ public class UriTemplate implements Serializable {
|
|||
* UriTemplate template = new UriTemplate("https://example.com/hotels/{hotel}/bookings/{booking}");
|
||||
* Map<String, String> uriVariables = new HashMap<String, String>();
|
||||
* uriVariables.put("booking", "42");
|
||||
* uriVariables.put("hotel", "Rest & Relax");
|
||||
* uriVariables.put("hotel", "Rest & Relax");
|
||||
* System.out.println(template.expand(uriVariables));
|
||||
* </pre>
|
||||
* will print: <blockquote>{@code https://example.com/hotels/Rest%20%26%20Relax/bookings/42}</blockquote>
|
||||
|
@ -113,7 +113,7 @@ public class UriTemplate implements Serializable {
|
|||
* <p>Example:
|
||||
* <pre class="code">
|
||||
* UriTemplate template = new UriTemplate("https://example.com/hotels/{hotel}/bookings/{booking}");
|
||||
* System.out.println(template.expand("Rest & Relax", 42));
|
||||
* System.out.println(template.expand("Rest & Relax", 42));
|
||||
* </pre>
|
||||
* will print: <blockquote>{@code https://example.com/hotels/Rest%20%26%20Relax/bookings/42}</blockquote>
|
||||
* @param uriVariableValues the array of URI variables
|
||||
|
|
|
@ -246,15 +246,15 @@ public abstract class UriUtils {
|
|||
* Encode the query parameters from the given {@code MultiValueMap} with UTF-8.
|
||||
* <p>This can be used with {@link UriComponentsBuilder#queryParams(MultiValueMap)}
|
||||
* when building a URI from an already encoded template.
|
||||
* <pre class="code">
|
||||
* MultiValueMap<String, String> params = new LinkedMultiValueMap<>(2);
|
||||
* <pre class="code">{@code
|
||||
* MultiValueMap<String, String> params = new LinkedMultiValueMap<>(2);
|
||||
* // add to params...
|
||||
*
|
||||
* ServletUriComponentsBuilder.fromCurrentRequest()
|
||||
* .queryParams(UriUtils.encodeQueryParams(params))
|
||||
* .build(true)
|
||||
* .toUriString();
|
||||
* </pre>
|
||||
* }</pre>
|
||||
* @param params the parameters to encode
|
||||
* @return a new {@code MultiValueMap} with the encoded names and values
|
||||
* @since 5.2.3
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
* Copyright 2002-2021 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -27,7 +27,7 @@ import org.springframework.web.server.ServerWebExchange;
|
|||
|
||||
/**
|
||||
* Implements the {@link RequestCondition} contract by delegating to multiple
|
||||
* {@code RequestCondition} types and using a logical conjunction (' && ') to
|
||||
* {@code RequestCondition} types and using a logical conjunction ({@code ' && '}) to
|
||||
* ensure all conditions match a given request.
|
||||
*
|
||||
* <p>When {@code CompositeRequestCondition} instances are combined or compared
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2020 the original author or authors.
|
||||
* Copyright 2002-2021 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -28,7 +28,7 @@ import org.springframework.web.cors.reactive.CorsUtils;
|
|||
import org.springframework.web.server.ServerWebExchange;
|
||||
|
||||
/**
|
||||
* A logical conjunction (' && ') request condition that matches a request against
|
||||
* A logical conjunction ({@code ' && '}) request condition that matches a request against
|
||||
* a set of header expressions with syntax defined in {@link RequestMapping#headers()}.
|
||||
*
|
||||
* <p>Expressions passed to the constructor with header names 'Accept' or
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2020 the original author or authors.
|
||||
* Copyright 2002-2021 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -26,7 +26,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||
import org.springframework.web.server.ServerWebExchange;
|
||||
|
||||
/**
|
||||
* A logical conjunction (' && ') request condition that matches a request against
|
||||
* A logical conjunction ({@code ' && '}) request condition that matches a request against
|
||||
* a set parameter expressions with syntax defined in {@link RequestMapping#params()}.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
* Copyright 2002-2021 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -29,7 +29,7 @@ import org.springframework.util.ObjectUtils;
|
|||
|
||||
/**
|
||||
* Implements the {@link RequestCondition} contract by delegating to multiple
|
||||
* {@code RequestCondition} types and using a logical conjunction (' && ') to
|
||||
* {@code RequestCondition} types and using a logical conjunction ({@code ' && '}) to
|
||||
* ensure all conditions match a given request.
|
||||
*
|
||||
* <p>When {@code CompositeRequestCondition} instances are combined or compared
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2020 the original author or authors.
|
||||
* Copyright 2002-2021 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -29,7 +29,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||
import org.springframework.web.cors.CorsUtils;
|
||||
|
||||
/**
|
||||
* A logical conjunction (' && ') request condition that matches a request against
|
||||
* A logical conjunction ({@code ' && '}) request condition that matches a request against
|
||||
* a set of header expressions with syntax defined in {@link RequestMapping#headers()}.
|
||||
*
|
||||
* <p>Expressions passed to the constructor with header names 'Accept' or
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2020 the original author or authors.
|
||||
* Copyright 2002-2021 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -30,7 +30,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||
import org.springframework.web.util.WebUtils;
|
||||
|
||||
/**
|
||||
* A logical conjunction (' && ') request condition that matches a request against
|
||||
* A logical conjunction ({@code ' && '}) request condition that matches a request against
|
||||
* a set parameter expressions with syntax defined in {@link RequestMapping#params()}.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
|
|
|
@ -412,7 +412,7 @@ public class MvcUriComponentsBuilder {
|
|||
* A JSP can prepare a URL to the controller method as follows:
|
||||
*
|
||||
* <pre class="code">
|
||||
* <%@ taglib uri="http://www.springframework.org/tags" prefix="s" %>
|
||||
* <%@ taglib uri="http://www.springframework.org/tags" prefix="s" %>
|
||||
*
|
||||
* <a href="${s:mvcUrl('PC#getPerson').arg(0,"123").build()}">Get Person</a>
|
||||
* </pre>
|
||||
|
|
|
@ -313,7 +313,7 @@ public class UrlTag extends HtmlEscapingAwareTag implements ParamAware {
|
|||
* @param usedParams set of parameter names that have been applied as
|
||||
* template params
|
||||
* @param includeQueryStringDelimiter true if the query string should start
|
||||
* with a '?' instead of '&'
|
||||
* with a '?' instead of '&'
|
||||
* @return the query string
|
||||
*/
|
||||
protected String createQueryString(List<Param> params, Set<String> usedParams, boolean includeQueryStringDelimiter)
|
||||
|
|
Loading…
Reference in New Issue