类 WebServerPortFileWriter

  • 所有已实现的接口:
    EventListener, org.springframework.context.ApplicationListener<WebServerInitializedEvent>

    public class WebServerPortFileWriter
    extends Object
    implements org.springframework.context.ApplicationListener<WebServerInitializedEvent>
    An ApplicationListener that saves embedded server port and management port into file. This application listener will be triggered whenever the server starts, and the file name can be overridden at runtime with a System property or environment variable named "PORTFILE" or "portfile".
    从以下版本开始:
    2.0.0
    • 方法详细资料

      • getPortFile

        protected File getPortFile​(org.springframework.context.ApplicationContext applicationContext)
        Return the actual port file that should be written for the given application context. The default implementation builds a file from the source file and the application context namespace if available.
        参数:
        applicationContext - the source application context
        返回:
        the file that should be written