Today is the second day of the year! Happy New Year to all of you
First leave a suspense to the small companions hey hey article at the end of the mysterious code ~ (you can guess why to drop first!)
Hey hey I don’t know how the Chinese New Year these two days you ~
Such as
How many red envelopes did the Spring Festival Gala get? ๐
Do you celebrate the New Year with someone you like? ใพ(โงโฝโฆ*)o ๐
Eat tired of big fish big meat not ~ ๐
Began to learn to have ๐
Take five to kill no ๐
Of course, at least by the time you read this article, you have already learned a little bit
Here we go
Year of the Ox ~ how we also study how to give us drop IDEA to add point drop atmosphere, like this
Spring Boot source Banner
Source code looks <(~) ~)โ[GO!
When Springboot starts, a SpringApplication object is created.
SpringApplication
The constructor
Specifies the mode for the banner
Banner
Functional interface
There are three patterns
run
methods
Create a banner object
Enter the above red box, you can see here if not OFF patterns to create SpringApplicationBannerPrinter object
As you can see, the class also defines the image type (GIF is also supported!). ~ ๐
Moving on to the source code below, you can see that the only difference here is the output stream, which is printed to the console or log file
return this.bannerMode == Mode.LOG ? bannerPrinter.print(environment, this.mainApplicationClass, logger) : bannerPrinter.print(environment, this.mainApplicationClass, System.out);
Copy the code
print
The source code
To get the Banner
getBanner
The source code
To get the Banner
getImageBanner
The source code
GIF, JPG and PNG will be searched in sequence
The image path can also be configured by itself. The default path is in the Resources folder ~
I don’t know if there are any friends who are curious about how this banner. GIF will print out
4ye here made a GIF with only three frames (too many frames will print endless hahaha ๐) the effect is ~
The second day, hello cow!
Java4ye A little white blogger focused on productivity ~(increasing groping time), sharing learning resources, technological awareness, little things about programmer life let us groping together ~(โ world twentyconsciousness) Java4ye here to prepare a series of learning resources for you, as well as a variety of plug-ins, software oh welcome message! Thanks for your support! O (โง ใพ del โฆ *)