The Banner
class provides functionality for printing a banner to the console, either from a predefined string or custom banner by reading from a file.
The Banner
class supports dynamic profile configuration using VM parameters.
The default Mode
value is ON
, meaning the banner will be printed to the console. To configure the Mode
to OFF
, use the -Dbring.main.banner=off
parameter during application launch.
To print a custom banner, create a file named banner.txt
in the resources
folder and set -Dbring.main.banner.file=resources/banner.txt
as a VM parameter.
BRING_BANNER_KEY
: Key for enabling/disabling the main banner. Default is "ON".BRING_BANNER_FILE_KEY
: Key for specifying the path to the banner file. Default is "resource/banner.txt".
Prints the banner to the console based on the configured mode and file settings.
Gets the configured banner mode (ON or OFF).
Checks if the banner should be read from a file based on the configuration.
Gets the path to the banner file, resolving it based on the classpath.
An enumeration of possible values for configuring the Banner.
OFF: Disable printing of the banner.
ON: Print the banner to console.