You are currently viewing Creating colorful Banners for Spring Boot Applications

Creating colorful Banners for Spring Boot Applications

Often it is nice if a service provides its own banner. Then you can easily recognize the start of the service, even when you just take a quick glimpse. Its even nicer if the banner could provide colors, just in case you have a log or a terminal that supports colored output. With the release 1.3.0 of Spring Boot it is possible to display colorful banners.

For my Chatty demo, I quickly created a banner using an ASCII art generator, like http://patorjk.com/software/taag/#p=display&f=Graffiti&t=Chatty. if you save it in a file named banner.txt and put it under src/main/resources, it would be displayed like:

chatty-banner1

With a little bit of ANSI colors I got

chatty-banner2

You find the current Chatty banner.txt here.

If you want to have it really colorful, you could create a banner like

chatty-banner3

You find the source for the above banner.txt here.

All in all, it was fun creating a new banner for my Spring Boot based demo service.

 

This Post Has 5 Comments

  1. SeB

    That is interesting, but you don’t say how to implement a new banner with spring-boot, please give a link at least.
    thank you.

    1. Kai Tödter

      SeB, you just have to create a text file ‘banner.txt’ and place it under src/main/resources. That’s all :). If you want to add ANSI colors, you can place statements like ${AnsiColor.BRIGHT_BLUE} in the banner.txt.

Leave a Reply

I accept the Privacy Policy