Playing With Spring Boot Banner
Posted By : Gaurav Kumar | 22-Jan-2021
Hello geeks, here I came up with a quick read but interesting blog post. Here I am going to show you the different possible customization available in the spring boot banner.
Have you noticed whenever you set up a brand new spring boot application and runs it a pretty nice spring log with version information is populated into the console, just like the screenshot below?
Now, here is the stuff you can perform with this logo.
- You can remove the entire logo,
- You can customize the text of the logo
- You can customize the font, color, and style of the logo.
- You can use any image instead of text.
Also Read: Spring Boot Data Rest
Let's see all of the above one by one.
You can remove or turn off the default spring logo populating while running the spring boot application by either using the properties file or programmatically.
Removing the Entire Logo
using the application.properties file
spring.main.banner-mode="off"
using application.yml file
spring:
main:
banner-mode: "off"
public class Application {
public static void main(String[] args) {
SpringApplication app = new SpringApplication(Application.class);
app.setBannerMode(Banner.Mode.OFF);
app.run(args);
}
}
Customizing Default Logo
spring.banner.location=classpath:realtive-path/banner.txt
Also Read: Profiles in Spring Boot
Why You Should Choose Oodles For SaaS Product Development?
We are a 360-degree software development company that provides cross-platform SaaS app development services to address varied software project requirements. We have an experienced team of Java, PHP, and Python developers who use advanced frameworks, tools, and SDKs to build scalable web and mobile applications with custom features. For more detail, reach us out at [email protected].
Cookies are important to the proper functioning of a site. To improve your experience, we use cookies to remember log-in details and provide secure log-in, collect statistics to optimize site functionality, and deliver content tailored to your interests. Click Agree and Proceed to accept cookies and go directly to the site or click on View Cookie Settings to see detailed descriptions of the types of cookies and choose whether to accept certain cookies while on the site.
About Author
Gaurav Kumar
He is always ready to grasp new tech and tools as per project requirement.