How to Customize Spring Boot Banner

Subscribe to my newsletter and never miss my upcoming articles

Hi everyone,

In this article, l will show you how to change spring boot default banner. You always see the default spring Banner in the console when the Spring application start.

Default Spring Boot BannerDefault Spring Boot Banner

Most of time you want to change it or you want to add details of your projects in the beginning of the console.

That’s very simple to change the banner. You only add a banner.txt to your resources.

resources directoryresources directory

The application will be load automatically when the application run. Unlike txt, the application also supports different image types like PNG, JPG, JPEG. But I always use .txt format and ASCII art , because it is text based and the application easily load and render it. I recommend you to use.

Let’s create a banner and add your logo. I have added ASCII ART text generared by **patorjk.com**.

Generated Ascii Art sample banner.Generated Ascii Art sample banner.

The supported colors;

  • ${Ansi.NAME}

  • ${AnsiColor.NAME}

  • ${AnsiBackground.NAME}

  • ${AnsiStyle.NAME}

You can check it out **ansi color**.

Colourful spring banner.Colourful spring banner.

That’s it. You change everytime your banner easily in the spring boot application. You can change easily your banner.

Finally, if you do not want to see the banner on the console, you can write the following command to your application.properties file.

spring.main.banner-mode=off

I hope you enjoy when reading…

Have a nice coding. coderkan - Overview Sign up for your own profile on GitHub, the best place to host code, manage projects, and build software alongside 40…github.com

References

No Comments Yet