Spring boot – Disable banner at startup

Lokesh Gupta

To disable the spring boot banner logo from console or log files, we can make changes in 3 possible ways i.e. programmatically, properties or startup arguments.

Banner mode can be set in 3 possible ways:

  1. OFF – Disable printing of the banner in console and log files.
  2. CONSOLE – Print the banner only to console.
  3. LOG – Print the banner only to the log file.

1. Disable banner programmatically

Set banner mode in program using setBannerMode(Banner.Mode.OFF) method call which starting the application.

2. Disable banner using properties

Use property key spring.main.banner-mode to set the banner mode using properties configuration.


3. Disable banner using startup arguments

Pass the property key spring.main.banner-mode as startup argument and set the mode there.

workspace> java -Dspring.main.banner-mode=off -jar spring-boot-simple-1.0.jar

Drop me your questions in comments related to disabling spring boot logo banner using spring.main.banner-mode.

Happy Learning !!

References: Spring boot docs


Notify of
Inline Feedbacks
View all comments

About Us

HowToDoInJava provides tutorials and how-to guides on Java and related technologies.

It also shares the best practices, algorithms & solutions and frequently asked interview questions.

Our Blogs

REST API Tutorial

Dark Mode

Dark Mode