The Spring Banner Plugin is a Maven plugin generating the banner that is printed on start up of a Spring Boot application.
____ _ ____
/ ___| _ __ _ __ (_) _ __ __ _ | __ ) __ _ _ __ _ __ ___ _ __
\___ \ | '_ \ | '__|| || '_ \ / _` | | _ \ / _` || '_ \ | '_ \ / _ \| '__|
___) || |_) || | | || | | || (_| | | |_) || (_| || | | || | | || __/| |
|____/ | .__/ |_| |_||_| |_| \__, | |____/ \__,_||_| |_||_| |_| \___||_|
|_| |___/
Version: 1.0, Server: localhost:8080, Active Profiles: none
<build>
<plugins>
<plugin>
<groupId>ch.acanda.maven</groupId>
<artifactId>spring-banner-plugin</artifactId>
<version>1.0</version>
<executions>
<execution>
<id>generate-spring-banner</id>
<phase>generate-resources</phase> <!--(1)-->
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration> <!--(2)-->
<text>${project.name}</text>
<outputDirectory>${project.build.outputDirectory}</outputDirectory>
<filename>banner.txt</filename>
<includeInfo>true</includeInfo>
<info>Version: ${application.version}, Server: ${server.address}:${server.port}, Active Profiles: ${spring.active.profiles}</info>
<version>${project.version}</version>
<color>default</color>
</configuration>
</plugin>
</plugins>
</build>
-
The default phase is
generate-resources
. This can be omitted unless you want to generate the banner in another phase. -
All configuration parameters are optional. The values in this example are the default values.
All parameters are optional.
- text
-
The banner text.
Default value:${project.name}
Property:banner.text
- outputDirectory
-
The directory of the banner file.
Default value:${project.build.outputDirectory}
Property:banner.outputDirectory
- filename
-
The name of the banner file.
Default value:banner.txt
Property:banner.filename
- includeInfo
-
true
(default): include the info line
false
: do not include the info line
Property:banner.includeInfo
- info
-
The line to print under the banner when
includeInfo
istrue
.
Default value:Version: ${application.version}, Server: ${server.address}:${server.port}, Active Profiles: ${spring.active.profiles}
Property:banner.info
- color
-
The color of the banner. Valid values are:
default
,black
,red
,green
,yellow
,blue
,magenta
,cyan
,white
,bright black
,bright red
,bright green
,bright yellow
,bright blue
,bright magenta
,bright cyan
andbright white
.
Default value:default
Property:banner.color
The Spring Banner Plugin is licensed under the Apache License, Version 2.0.