
Baeldung Pro comes with both absolutely No-Ads as well as finally with Dark Mode, for a clean learning experience:
Once the early-adopter seats are all used, the price will go up and stay at $33/year.
Last updated: May 8, 2025
By default, Spring Boot displays a banner on application start-up. The banner is an ASCII art representation of the word ‘Spring‘. However, we can replace this with a custom ASCII art banner.
In this tutorial, we’ll learn how to create a custom banner using ASCII art.
First, let’s create ASCII art banner using a combination of characters such as @, #,*, and 8 to form the Baeldung logo:
Next, let’s save the ASCII art as banner.txt and place it in the root of the resources folder. Spring Boot automatically detects the banner.txt in this location and uses it instead of the default banner.
In the previous section, we created an ASCII art banner and placed it in the resources folder for automatic detection by Spring Boot.
However, if we want to use a different file name or location, we can specify the banner location using the spring banner.location property in the application.properties file:
spring.banner.location=classpath:/path/to/banner/bannername.txt
Here, we specify the path to the custom ASCII art banner.
Before Spring Boot version 3.0.0 M2, we could use image banners in formats such as .gif, .png, and .jpg. Like banner.txt, Spring Boot expects this file to be named banner.gif, banner.png, or banner.jpg.
Alternatively, we could place the image in a custom location and reference it using the spring.banner.image.location property in the application.properties:
spring.banner.image.location=classpath:banner.gif
Preferably, a text-based banner is better because an image banner could increase the application start-up time based on the complexity of the image used.
Starting from Spring Boot version 3.0.0 M2, image formats such as GIF, JPEG, and PNG are no longer supported, leaving the banner.txt format as the only supported format.
In this article, we saw how to create and use a custom ASCII art banner in Spring Boot applications.