If you’d like to override the standard Spring Boot banner with something custom, then you’ve come to the right place. Find any image you want to convert to ASCII art. Then, download the following Git Hub project
Now, you can run a script like the following:
./image2ascii -f ~/Downloads/trinity-neo-morpheus-2.jpg -g 57 -w 100 | tee banner.txt
You’ll see something like the following print out (in color):
Now, you simply can put this file banner.txt
into the appropriate folder in a Maven built Java project. If you put it into a common library with Autowiring, it will be available more readily to all of your dependent projects.
src/main/resources/banner.txt
Now, you can just build and run and you’ll see this print out without any further configurations (following convention over configuration). If you really want to tweak the configurations you can use some of the following properties in the application.properties
spring.banner.charset: It configures banner encoding. Default is UTF-8
spring.banner.location: It is banner file location. Default is classpath:banner.txt
spring.banner.image.location: It configures banner image file location. Default is classpath:banner.gif. File can also be jpg, png.
spring.banner.image.width: It configures width of the banner image in char
. Default is 76.
spring.banner.image.height: It configures height of the banner image in char
. Default is based on image height.
spring.banner.image.margin: It is left hand image margin in char
. Default is 2.
spring.banner.image.invert: It configures if images should be inverted for dark terminal themes. Default is false.
spring.main.banner-mode=off
As, you can see you can use images as well. Also, if you were so inclined, you could even use variable substitution in your ASCII art for printing things out, such as the application name and version number.
The Writing has become like a favorite meeting spot, where great minds and ideas mingle.
The insights are like a fine wine—rich, fulfilling, and leaving me wanting more.
I appreciate the balance and fairness in The writing. Great job!
The insights add so much value, like an unexpected compliment that brightens one’s day. Thanks for sharing.
A masterpiece of writing. Van Gogh’s got nothing on you, except maybe both ears.
You’ve opened my eyes to new perspectives, as if you knew the way to my curious heart.
The depth of The research is impressive, almost as much as the way you make hard to understand topics captivating.
The writing has the warmth and familiarity of a favorite sweater, providing comfort and insight in equal measure.
The words are like brush strokes on a canvas, painting ideas in my mind.
You write with such passion and clarity, it’s like listening to a love song for the mind.
The insights are like a fine wine—rich, fulfilling, and leaving me wanting more.
A perfect blend of informative and entertaining, like the ideal date night conversation.
The Writing is a go-to resource, like a favorite coffee shop where the barista knows The order. Always comforting.
Making hard to understand topics accessible, you’re like the translator I never knew I needed.
The depth you bring to The topics is like diving into a deep pool, refreshing and invigorating.
Every word you write sparkles with insight, like stars in my night sky. Can’t wait to navigate more skies together.
Reading The post was like going on a first date with my mind. Excited for the next rendezvous.