Expand Authors Top

If you have a few years of experience in the Java ecosystem and you’d like to share that with the community, have a look at our Contribution Guidelines.

Expanded Audience – Frontegg – Security (partner)
announcement - icon User management is very complex, when implemented properly. No surprise here.

Not having to roll all of that out manually, but instead integrating a mature, fully-fledged solution - yeah, that makes a lot of sense.
That's basically what Frontegg is - User Management for your application. It's focused on making your app scalable, secure and enjoyable for your users.
From signup to authentication, it supports simple scenarios all the way to complex and custom application logic.

Have a look:

>> Elegant User Management, Tailor-made for B2B SaaS

Generic Top

Get started with Spring 5 and Spring Boot 2, through the Learn Spring course:


1. Introduction

Spring Boot is a great way to create Java web applications, but some of its default behavior may not be ideal for everyone.

One particular feature is the Spring Boot banner that gets printed at startup:

spring boot banner 1

While this banner is typically harmless, in some cases it may be desirable to disable it. For example, to prevent errors with custom logging configurations or save bandwidth with remote log aggregation systems.

In this tutorial, we will look at some different ways to disable the Spring Boot banner at startup.

2. Using Configuration

Using configuration is the most flexible way to disable the startup banner. It requires no code changes and can easily be reverted if needed.

We can disable the startup banner using application.properties:


Or if we are using application.yaml:

    banner-mode: "off"

And finally, thanks to Spring Boot's externalized configuration support, we can also disable it by setting an environment variable:


3. Using Code

In addition to configuration, there are also multiple ways to disable the Spring Boot banner using code. The downside to using code is that we need to do this for each application, and it requires a code change to revert.

When using the SpringApplicationBuilder:

new SpringApplicationBuilder(MyApplication.class)

And when using SpringApplication:

SpringApplication app = new SpringApplication(MyApplication.class);

4. Using IDE

Most modern IDEs include a way to disable the Spring Boot banner without needing configuration or code.

IntelliJ offers a checkbox for Spring Boot run configurations that will disable the banner:

disable spring boot banner intellij

5. Change Banner Text

Another way to disable the Spring Boot startup banner is to change the banner text to an empty file.

We first specify a custom file in application.properties:


Or, if we're using YAML:

    location: classpath:/banner.txt

Then we create a new empty file in src/main/resources named banner.txt.

6. Conclusion

In this tutorial, we've seen various ways to disable the Spring Boot banner, using a combination of configuration or code.

Generic bottom

Get started with Spring 5 and Spring Boot 2, through the Learn Spring course:

Generic footer banner
Comments are closed on this article!