Banner in Springboot is a support for matching (banner style, banner color, banner content), whether or not to display.
1) banner Display content configuration:
Default Springboot If you include such a banner message under Src/resources, the Banner.txt content is used to replace the spring boot default banner information:
${ansicolor.bright_yellow} ${ansicolor.bright_red}_ooooo_${ansicolor.bright_yellow} ${ansicolor.bright_red}o8888888o${ansicolor.bright_yellow} ${ansicolor.bright_red}88${ansicolor.bright_yellow} ". "${ansicolor.bright_red}88${ansicolor.bright_yellow} (|-_-|) O\=/ o ____/'---' \____. ' \\| |// `. / \\||| : ||| // / _||||| -:- ||||| - | | \\\ - /// | | | \_| ' \---/' | | \ .-\__ `-` ___/-. / ___`. .‘ /--.--\ `. . __ ."' < '. ___\_<|>_/___. ' > ' "". | | : `- \`.;`\ _ /`;. `/ - ` : | | \ \ `-. \_ __\ /__ _/ .-` / /====== '-.____ '-.___\_____/___.-' ____.-' ====== `=---=' ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^, ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ the ^^ ^ Buddha bless never Bug
Note:
1) where the banner.txt content of the first line of information, used to configure the banner.txt text color;
2) The banner content which is contained by the color style is a modification to the color of the banner individual information.
2) banner Whether the configuration mode is displayed:
Mode 1) via Src/resources/applicatioin.properties configuration:
# Optional value: Console.off.logspring.main.banner-mode=off
Mode 2) by starting the entry function configuration:
Packageapp;ImportOrg.springframework.boot.Banner;Importorg.springframework.boot.SpringApplication;Importorg.springframework.boot.autoconfigure.EnableAutoConfiguration;ImportOrg.springframework.boot.builder.SpringApplicationBuilder;ImportOrg.springframework.context.annotation.ComponentScan;Importjava.util.Arrays; @ComponentScan ("Com.dx.controller") @EnableAutoConfiguration Public classApp { Public Static voidMain (string[] args) {System.out.println (arrays.tostring (args)); //starting mode one://Springapplication.run (App.class, args); //starting mode two://springapplication springapplication = new Springapplication (app.class);//Springapplication.setbannermode (Banner.Mode.OFF);//Springapplication.run (args); //starting mode three: NewSpringapplicationbuilder (App.class). Bannermode (Banner.Mode.OFF). Build (). Run (args); }}
Springboot (iv): Control of Banner