How to Create a Custom Spring Boot Startup Banner

This guide shows how to display a custom ASCII art logo in the console by adding a banner.txt file to the resources folder and using Spring Boot's built‑in variables such as ${AnsiColor} and ${spring-boot.version} to customize the appearance.

Coder Trainee
Coder Trainee
Coder Trainee
How to Create a Custom Spring Boot Startup Banner

Many developers want their Spring Boot application to print a custom logo or ASCII art when it starts. Spring Boot makes this easy: simply add a banner.txt file to the src/main/resources directory.

Place the desired picture or text in banner.txt. The article includes two example images that illustrate how the banner looks once the file is created.

When the application is launched, Spring Boot automatically reads banner.txt and prints its content to the console, producing the visual effect shown in the examples.

Variable Reference

${AnsiColor}: sets the text color.

${AnsiBackground}: sets the background color.

${application.version}: inserts the version number from the MANIFEST.MF file (if the version cannot be resolved, the placeholder remains empty).

${application.formatted-version}: inserts the version wrapped in parentheses, e.g., (v1.5.12.RELEASE).

${spring-boot.version}: inserts the Spring Boot version.

${spring-boot.formatted-version}: inserts the formatted Spring Boot version.

After configuring the banner and optionally using the variables above, start the Spring Boot project and the custom banner will appear in the console.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

JavaBackend Developmentspring-bootASCII artstartup banner
Coder Trainee
Written by

Coder Trainee

Experienced in Java and Python, we share and learn together. For submissions or collaborations, DM us.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.