Class ResourceBanner

java.lang.Object
org.springframework.boot.ResourceBanner
All Implemented Interfaces:
Banner

public class ResourceBanner extends Object implements Banner
Banner implementation that prints from a source text Resource.
Since:
1.2.0
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.springframework.boot.Banner

    Banner.Mode
  • Constructor Summary

    Constructors
    Constructor
    Description
    ResourceBanner(org.springframework.core.io.Resource resource)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected String
    getApplicationTitle(Class<?> sourceClass)
    Return the application title that should be used for the source class.
    protected String
    getApplicationVersion(Class<?> sourceClass)
    Deprecated, for removal: This API element is subject to removal in a future version.
    since 3.4.0 for removal in 3.6.0
    protected String
     
    protected List<org.springframework.core.env.PropertyResolver>
    getPropertyResolvers(org.springframework.core.env.Environment environment, Class<?> sourceClass)
    Return a mutable list of the PropertyResolver instances that will be used to resolve placeholders.
    void
    printBanner(org.springframework.core.env.Environment environment, Class<?> sourceClass, PrintStream out)
    Print the banner to the specified print stream.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ResourceBanner

      public ResourceBanner(org.springframework.core.io.Resource resource)
  • Method Details

    • printBanner

      public void printBanner(org.springframework.core.env.Environment environment, Class<?> sourceClass, PrintStream out)
      Description copied from interface: Banner
      Print the banner to the specified print stream.
      Specified by:
      printBanner in interface Banner
      Parameters:
      environment - the spring environment
      sourceClass - the source class for the application
      out - the output print stream
    • getPropertyResolvers

      protected List<org.springframework.core.env.PropertyResolver> getPropertyResolvers(org.springframework.core.env.Environment environment, Class<?> sourceClass)
      Return a mutable list of the PropertyResolver instances that will be used to resolve placeholders.
      Parameters:
      environment - the environment
      sourceClass - the source class
      Returns:
      a mutable list of property resolvers
    • getApplicationTitle

      protected String getApplicationTitle(Class<?> sourceClass)
      Return the application title that should be used for the source class. By default will use Package.getImplementationTitle().
      Parameters:
      sourceClass - the source class
      Returns:
      the application title
    • getApplicationVersion

      @Deprecated(since="3.4.0", forRemoval=true) protected String getApplicationVersion(Class<?> sourceClass)
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 3.4.0 for removal in 3.6.0
      Returns the application version.
      Parameters:
      sourceClass - the source class
      Returns:
      the application version or null if unknown
    • getBootVersion

      protected String getBootVersion()