org.springframework.boot.web.context

Class WebServerPortFileWriter

    • Constructor Detail

      • WebServerPortFileWriter

        public WebServerPortFileWriter()
        Create a new WebServerPortFileWriter instance using the filename 'application.port'.
      • WebServerPortFileWriter

        public WebServerPortFileWriter(String filename)
        Create a new WebServerPortFileWriter instance with a specified filename.
        Parameters:
        filename - the name of file containing port
      • WebServerPortFileWriter

        public WebServerPortFileWriter(File file)
        Create a new WebServerPortFileWriter instance with a specified file.
        Parameters:
        file - the file containing port
    • Method Detail

      • getPortFile

        protected File getPortFile(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.
        Parameters:
        applicationContext - the source application context
        Returns:
        the file that should be written