How to change Spring's Boot default startup ASCII message

problem

You wish to change the default banner – logo of Spring Boot. The default one at the time of writing this post looks like this:

spring boot default banner

SOLUTION 1 - ASCII

Create a text based banner (ASCII) and place it in the classpath with a file title: banner.txt

banner.txt
				
					 .----------------.  .----------------.  .----------------.
| .--------------. || .--------------. || .--------------. |
| |   _____      | || |     ____     | || |   _____      | |
| |  |_   _|     | || |   .'    `.   | || |  |_   _|     | |
| |    | |       | || |  /  .--.  \  | || |    | |       | |
| |    | |   _   | || |  | |    | |  | || |    | |   _   | |
| |   _| |__/ |  | || |  \  `--'  /  | || |   _| |__/ |  | |
| |  |________|  | || |   `.____.'   | || |  |________|  | |
| |              | || |              | || |              | |
| '--------------' || '--------------' || '--------------' |
 '----------------'  '----------------'  '----------------' 
				
			

The file can be placed in the resources folder if you’re using Maven project structure:

output​
spring boot banner

The ASCII text is shown, lol.

SOLUTION 2 - IMAGE

You can also place banner.jpg, banner.png, banner.gif and Spring will convert it into ASCII (if possible)

conclusion

In this post we saw how to change the default Spring’s Boot banner by placing a banner.txt file in the classpath.

Share it!

Facebook
Twitter
LinkedIn
Reddit
Picture of Ellion

Ellion

Professional IT consultant, writer, programmer enthusiast interested in all sorts of coding.
Eats all cookies 🍪