How to Create a Custom Spring Boot Banner with ASCII Art and Color
This guide explains how to personalize the Spring Boot startup banner by adding an ASCII‑art banner.txt file, using placeholder variables for colors and version information, and provides online tools for generating the required character art, making the process quick and enjoyable for developers.
Customizing Spring Boot startup banner
Place a file named banner.txt in src/main/resources. Spring Boot reads this file at startup and prints its content instead of the default banner.
Supported placeholders
${AnsiColor.BRIGHT_RED}– sets the following text color to bright red. ${application.version} – reads the Implementation-Version value from the MANIFEST.MF file. ${application.formatted-version} – a formatted version derived from ${application.version}. ${spring-boot.version} – displays the Spring Boot version. ${spring-boot.formatted-version} – displays a formatted Spring Boot version.
Generating ASCII art for the banner
Hand‑crafting ASCII art is tedious, so use an online generator to convert text or images into a character matrix and copy the result into banner.txt. Common free tools include:
http://patorjk.com/software/taag
http://www.network-science.de/ascii/
http://www.degraeve.com/img2txt.php
Example banner
An example banner may contain festive text such as “Happy New Year, never downtime, no bugs” together with the placeholders above. When the application starts, Spring Boot renders the custom banner with the specified colors and version information.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Programmer DD
A tinkering programmer and author of "Spring Cloud Microservices in Action"
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
