See gh-18490
pull/18501/head
Johnny Lim 5 years ago committed by Phillip Webb
parent 4cfbe7fd3b
commit 701bd0dd46

@ -48,7 +48,7 @@ import org.springframework.context.annotation.Import;
* <p>
* This configuration class is active only when the RabbitMQ and Spring AMQP client
* libraries are on the classpath.
* <P>
* <p>
* Registers the following beans:
* <ul>
* <li>{@link org.springframework.amqp.rabbit.core.RabbitTemplate RabbitTemplate} if there

@ -24,7 +24,7 @@ import org.springframework.core.io.ResourceLoader;
import org.springframework.util.Assert;
/**
* Initialize the Spring Batch schema (ignoring errors, so should be idempotent).
* Initialize the Spring Batch schema (ignoring errors, so it should be idempotent).
*
* @author Dave Syer
* @author Vedran Pavic

@ -34,7 +34,7 @@ import org.springframework.data.mongodb.gridfs.GridFsTemplate;
* <p>
* Registers a {@link MongoTemplate} and {@link GridFsTemplate} beans if no other beans of
* the same type are configured.
* <P>
* <p>
* Honors the {@literal spring.data.mongodb.database} property if set, otherwise connects
* to the {@literal test} database.
*

@ -49,7 +49,7 @@ import org.springframework.data.mongodb.gridfs.ReactiveGridFsTemplate;
* <p>
* Registers a {@link ReactiveMongoTemplate} bean if no other bean of the same type is
* configured.
* <P>
* <p>
* Honors the {@literal spring.data.mongodb.database} property if set, otherwise connects
* to the {@literal test} database.
*

@ -1301,7 +1301,7 @@ By default, Spring Boot picks up the native configuration from its default locat
=== Configure Logback for Logging
If you need to apply customizations to logback beyond those that can be achieved with `application.properties`, you'll need to add a standard logback configuration file.
You can add a `logback.xml` file to the root of your classpath for logback to find.
You can also use `logback-spring.xml` if you want to use the <<spring-boot-features.adoc#boot-features-logback-extensions,Spring Boot Logback extensions>>)
You can also use `logback-spring.xml` if you want to use the <<spring-boot-features.adoc#boot-features-logback-extensions,Spring Boot Logback extensions>>.
TIP: The Logback documentation has a https://logback.qos.ch/manual/configuration.html[dedicated section that covers configuration] in some detail.

@ -27,7 +27,7 @@ import org.springframework.beans.factory.support.AbstractBeanDefinition;
import org.springframework.core.Ordered;
/**
* {@link BeanFactoryPostProcessor} to set lazy-init on bean definitions that not
* {@link BeanFactoryPostProcessor} to set lazy-init on bean definitions that are not
* {@link LazyInitializationExcludeFilter excluded} and have not already had a value
* explicitly set.
*
@ -57,8 +57,11 @@ public final class LazyInitializationBeanFactoryPostProcessor implements BeanFac
Collection<LazyInitializationExcludeFilter> filters, String beanName,
AbstractBeanDefinition beanDefinition) {
Boolean lazyInit = beanDefinition.getLazyInit();
if (lazyInit != null) {
return;
}
Class<?> beanType = getBeanType(beanFactory, beanName);
if (lazyInit == null && !isExcluded(filters, beanName, beanDefinition, beanType)) {
if (!isExcluded(filters, beanName, beanDefinition, beanType)) {
beanDefinition.setLazyInit(true);
}
}

@ -21,16 +21,16 @@ import org.springframework.beans.factory.support.AbstractBeanDefinition;
/**
* Filter that can be used to exclude beans definitions from having their
* {@link AbstractBeanDefinition#setLazyInit(boolean) lazy-int} set by the
* {@link AbstractBeanDefinition#setLazyInit(boolean) lazy-init} set by the
* {@link LazyInitializationBeanFactoryPostProcessor}.
* <P>
* <p>
* Primarily intended to allow downstream projects to deal with edge-cases in which it is
* not easy to support lazy-loading (such as in DSLs that dynamically create additional
* beans). Adding an instance of this filter to the application context can be used for
* these edge cases.
* <P>
* <p>
* A typical example would be something like this:
* <P>
* <p>
* <pre><code>
* &#64;Bean
* public static LazyInitializationExcludeFilter integrationLazyInitializationExcludeFilter() {
@ -38,7 +38,7 @@ import org.springframework.beans.factory.support.AbstractBeanDefinition;
* }</code></pre>
* <p>
* NOTE: Beans of this type will be instantiated very early in the spring application
* lifecycle so should generally be declared static and not have any dependencies.
* lifecycle so they should generally be declared static and not have any dependencies.
*
* @author Tyler Van Gorder
* @author Philip Webb
@ -49,11 +49,11 @@ public interface LazyInitializationExcludeFilter {
/**
* Returns {@code true} if the specified bean definition should be excluded from
* having {@code lazy-int} automatically set.
* having {@code lazy-init} automatically set.
* @param beanName the bean name
* @param beanDefinition the bean definition
* @param beanType the bean type
* @return {@code true} if {@code lazy-int} should not be automatically set
* @return {@code true} if {@code lazy-init} should not be automatically set
*/
boolean isExcluded(String beanName, BeanDefinition beanDefinition, Class<?> beanType);

@ -22,7 +22,7 @@ import org.springframework.core.env.PropertySource;
/**
* Strategy used to provide a mapping between a {@link PropertySource} and a
* {@link ConfigurationPropertySource}.
* <P>
* <p>
* Mappings should be provided for both {@link ConfigurationPropertyName
* ConfigurationPropertyName} types and {@code String} based names. This allows the
* {@link SpringConfigurationPropertySource} to first attempt any direct mappings (i.e.

Loading…
Cancel
Save