how to disable spring boot logo in stdout?

后端 未结 8 679
名媛妹妹
名媛妹妹 2021-01-30 19:08

Is there a way to disable the lovely but very visible ASCII Spring boot logo :

  .   ____          _            __ _ _
 /\\\\ / ___\'_ __ _ _(_)_ __  __ _ \\ \\          


        
8条回答
  •  无人及你
    2021-01-30 19:45

    You can use this code to remove banner

    import org.springframework.boot.Banner;
    import org.springframework.boot.SpringApplication;
    import org.springframework.boot.autoconfigure.SpringBootApplication;
    
    @SpringBootApplication
    
    
    public class SpringBootConsoleApplication {
    
        public static void main(String[] args) throws Exception {
    
            SpringApplication app = new SpringApplication(SpringBootConsoleApplication.class);
            app.setBannerMode(Banner.Mode.OFF);
            app.run(args);
    
        }
    
    }
    

提交回复
热议问题