Tweak EmbeddedServletContainerCustomizer javadoc

Make it a little clearer that a
EmbeddedServletContainerCustomizerBeanPostProcessor is usually involved.

Issue: #53029445
This commit is contained in:
Phillip Webb 2013-07-10 09:00:25 -07:00
parent d260fa6456
commit fbc68fe145
2 changed files with 9 additions and 6 deletions

View File

@ -16,12 +16,18 @@
package org.springframework.bootstrap.context.embedded;
import org.springframework.beans.factory.config.BeanPostProcessor;
/**
* Strategy interface for customizing auto-configured embedded servlet containers. Any
* beans of this type will get a callback with the container factory before the container
* itself is started, so you can set the port, address, error pages etc. Beware: will be
* called from a BeanPostProcessor (so very early in the ApplicationContext lifecycle), so
* it might be safer to lookup dependencies lazily in the enclosing BeanFactory rather
* itself is started, so you can set the port, address, error pages etc.
*
* <p>
* Beware: calls to this interface are usually made from a
* {@link EmbeddedServletContainerCustomizerBeanPostProcessor} which is a
* {@link BeanPostProcessor} (so called very early in the ApplicationContext lifecycle).
* It might be safer to lookup dependencies lazily in the enclosing BeanFactory rather
* than injecting them with <code>@Autowired</code>.
*
* @author Dave Syer

View File

@ -37,9 +37,6 @@ import org.springframework.core.annotation.AnnotationAwareOrderComparator;
public class EmbeddedServletContainerCustomizerBeanPostProcessor implements
BeanPostProcessor, ApplicationContextAware {
// FIXME should we register this by default, Javadoc in
// EmbeddedServletContainerCustomizer suggests so
private ApplicationContext applicationContext;
private List<EmbeddedServletContainerCustomizer> customizers;