Home > AI > Backend > SpringBoot >

disable the SpringBoot banner

Method 1: application.properties

1
spring.main.banner-mode=off

Method 2: application.yml

1
2
3
spring:
  main:
    banner-mode: "off"

Method 3: Code

1
2
3
4
5
6
7
8
9
10
11
12
13
@SpringBootApplication
public class Demo12Application {
 
 
    public static void main(String[] args) {
 
        SpringApplication app = new SpringApplication(Demo12Application.class);
        app.setBannerMode(Banner.Mode.OFF);
        app.run(args);
 
    }
 
}

Method 4: Code

1
2
3
4
5
6
7
8
9
10
11
12
13
@SpringBootApplication
public class Demo12Application {
 
 
    public static void main(String[] args) {
 
        new SpringApplicationBuilder(Demo12Application.class)
                .bannerMode(Banner.Mode.OFF)
                .run(args);
 
    }
 
}

Change banner text

application.properties

1
spring.banner.location=classpath:/banner.txt

banner.txt

1
TUTEHUB

Leave a Reply