how to disable spring boot logo in stdout?
http://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/#boot-features-banner
new SpringApplicationBuilder() .showBanner(false) .sources(Parent.class) .child(Application.class) .run(args);
EditIn the newer versions of spring boot(current is 1.3.3) the way to do it is:
1) application.properties
spring.main.banner-mode=off
2) application.yml
spring: main: banner-mode: "off"
3) main method
public static void main(String[] args) { SpringApplication app = new SpringApplication(MySpringConfiguration.class); app.setBannerMode(Banner.Mode.OFF); app.run(args);}
Edit:
To change this with and environment variable use the property with underscore instead of dot. Try:
SPRING_MAIN_BANNER-MODE=off
See the docs for externalized config.
Another option is adding custom banner in a banner.txt file to your classpath, that will change to your custom banner.
- create a file banner.txt in the classpath (i.e: src/main/resources)
- Edit you custom banner
- Run the application
This has changed slightly in Spring Boot 1.3. The property is now:
spring.main.banner_mode=off
In code, it is now:
springApplication.setBannerMode(Banner.Mode.OFF);
or using the builder:
new SpringApplicationBuilder().bannerMode(Banner.Mode.OFF)