May It Be

Enya Patricia Brennan, born in 1961, is an Irish musician. She is the highest selling solo Irish artist of all time. Her 2001 song ‘May it Be’ was written specifically for Peter Jackson’s movie ‘The…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Spring Boot Custom Startup Banner

Customizing the banner at Spring Boot startup

Hello guys! Today I want to show you a very nice feature that is customizing the banner showed on the console when a Spring application starts up. By default, Spring Boot comes with its default banner indicating the Spring Boot version we are using, as in the following image :

With Spring Boot we can create and use a banner like that above, using text with a custom message or title, and we can also customize the banner starting from a GIF image. I think it’s a nice feature because we can make unique our applications and give a touch of style to our server-side.

For this demo, I’ve created a banner like the image above simply going to the link I’ve shared before, inserted the “Hello World” message and chosen the “banner” style. Then I’ve selected and copied all the resulting text into a file called banner.txt .

Now if we copy the banner.txt file inside the folder src/main/resources and try to start this application we already get the desired result, because Spring Boot uses by default a file called exactly banner.txt.

If we want to choose any other location or name for the banner, we have to set the spring.banner.location property in the application.properties file (or in the respective application.yml if you use that) :

Add a comment

Related posts:

See the Colors of My Mask

You say you know me and yet I have questions too. “See the Colors of My Mask” is published by Kevin Farran. Questions on social justice and prejudice.

Um workshop em que alunos e professores de Design de Produto e PP trabalham juntos

Dentre as vantagens de se estar na universidade estão as oportunidades que ela proporciona. Ficar sabendo das tendências e ficar em contato com o mercado são pontos positivos e um exemplo é o…