In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
How to customize Banner for Springboot application, this article introduces the corresponding analysis and solution in detail, hoping to help more partners who want to solve this problem to find a more simple and easy way.
This small function is said to be a small colored egg of Springboot2.x, which has been out for a long time. I knew I hadn't tried it before, but I tried it this time, and it was okay, it was fun. Recently, because I started to re-read Springboot, I saw this part, so I sorted it into the article.
What is banner?
This is the default Spring logo, sometimes it looks so ugly that it is useless to change it, and sometimes it will slow down the startup of your Springboot application. So just watch and have fun.
One-step realization
Look, in the resource directory of your springboot project, create a new banner.txt file, and what you write in it is what you want to display.
For example, we wrote: "Yu Gong wants to move mountains."
It's ugly to write this way. It's not as good as the previous format, but it doesn't matter, there are some good-looking websites that have been realized for us. Just replace the content after conversion.
You can generate character drawings based on the characters you enter: http://patorjk.com/software/taag/#p=display&f=Doh&t=fengdongdong
You can display the characters according to the drawing: https://www.degraeve.com/img2txt.php
Try using a map.
The effect is as follows:
Figure it out for yourself.
Or ugly? It's okay. Keep looking.
The color is terrible. It's all right. There's still configuration.
Spring provides three enumeration classes to set the color of characters, which are:
AnsiColor: used to set the foreground color of characters
AnsiBackground: used to set the background color of characters
AnsiStyle: used to control bold, italic, underline, and so on.
Let's try to set a color.
Finally, start it and see the effect.
This is the answer to the question about how to customize Banner for Springboot applications. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel to learn more about it.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.