How to change the Spring Boot banner in your project?

In this post, I am going to share a two-step approach to change the Spring Boot banner in your project.

Create Your Own(Customized) Spring Boot Banner

Create your customized Spring Boot banner in .txt file format.

Here is an example for your reference.

Filename: banner.txt

**************************************************************************
*                                                                        *
*               HELLO THIS IS MY AWESOME PROJECT                         *
*                               WWW.BHUTANIO.COM                         *
*                                                                        *
************************************************************************** 

Add Spring Boot banner path in application.properties file

The next step is to customize your application.properties file.

spring.banner.location=classpath:path_to_your_banner_file.txt

For simplicity, I keep the file banner file in the resources directory (the directory where you keep your project’s initial database ).

If you keep the banner file in the resources directory, and if the banner file’s name with file extension is banner.txt, then the classpath of your banner file would look something like this:

spring.banner.location=classpath:banner.txt

Sample Output

Here is how your Spring Boot banner would look like:

Customized Spring Boot banner screenshot

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *