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 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 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.
The supported colors;
${Ansi.NAME}
${AnsiColor.NAME}
${AnsiBackground.NAME}
${AnsiStyle.NAME}
You can check it out **ansi color**.
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