➤ How to Code a Game
➤ Array Programs in Java
➤ Java Inline Thread Creation
➤ Java Custom Exception
➤ Hibernate vs JDBC
➤ Object Relational Mapping
➤ Check Oracle DB Size
➤ Check Oracle DB Version
➤ Generation of Computers
➤ XML Pros & Cons
➤ Git Analytics & Its Uses
➤ Top Skills for Cloud Professional
➤ How to Hire Best Candidates
➤ Scrum Master Roles & Work
➤ CyberSecurity in Python
➤ Protect from Cyber-Attack
➤ Solve App Development Challenges
➤ Top Chrome Extensions for Twitch Users
➤ Mistakes That Can Ruin Your Test Metric Program
Banner in Spring Boot | When we start any Spring Boot application one logo is printed at the console called Banner. This Banner setup and printing is done when we run the starter class.

We can even customize our code ie OFF Banner, modify data, etc.
interface Banner {
enum Mode { OFF, CONSOLE, LOG } ;
}
Example to turn off the Banner (Modify starter class):-
package com.knowprogram.demo;
import org.springframework.boot.Banner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class StopWatchDemoApplication {
public static void main(String[] args) {
SpringApplication sa = new SpringApplication(StopWatchDemoApplication.class);
sa.setBannerMode(Banner.Mode.OFF);
sa.run(args);
}
}
Default Banner.Mode.CONSOLE, therefore banner is printed at the console.
Adding Custom Banner in Spring Boot
To provide our own banner file, we need to create one Txt file under the src/main/resources folder because Spring Boot has provided an internal key:- spring.banner.location=classpath:banner.txt
Here, classpath means src/main/resources folder.
You can take the help of any online tool to generate the Spring Boot Banner and download the file. Place the file in the src/main/resources folder. Add the following in the properties file:-
spring.banner.location=classpath:banner.txt
If you enjoyed this post, share it with your friends. Do you want to share more information about the topic discussed above or do you find anything incorrect? Let us know in the comments. Thank you!