org.springframework.boot.web.server

Interface WebServerFactoryCustomizer<T extends WebServerFactory>

  • Type Parameters:
    T - The configurable web server factory
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.


    @FunctionalInterface
    public interface WebServerFactoryCustomizer<T extends WebServerFactory>
    Strategy interface for customizing web server factories. Any beans of this type will get a callback with the server factory before the server itself is started, so you can set the port, address, error pages etc.

    Beware: calls to this interface are usually made from a WebServerFactoryCustomizerBeanPostProcessor which is a 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 @Autowired.

    Since:
    2.0.0
    Author:
    Phillip Webb, Dave Syer, Brian Clozel
    See Also:
    WebServerFactoryCustomizerBeanPostProcessor
    • Method Detail

      • customize

        void customize(T factory)
        Customize the specified WebServerFactory.
        Parameters:
        factory - the web server factory to customize

Copyright © 2018 Pivotal Software, Inc.. All rights reserved.