springboot自定义banner佛祖以及banner关闭

今天看到springboot可以自定义启动时的banner,然后自己试了一下,这里弄的是一个佛祖头像,步骤很简单,首先在resources目录下,新建一个banner.txt文件。然后把下面的内容给复制进去:

////////////////////////////////////////////////////////////////////
//                          _ooOoo_                               //
//                         o8888888o                              //
//                         88" . "88                              //
//                         (| ^_^ |)                              //
//                         O\  =  /O                              //
//                      ____/`---'\____                           //
//                    .'  \\|     |//  `.                         //
//                   /  \\|||  :  |||//  \                        //
//                  /  _||||| -:- |||||-  \                       //
//                  |   | \\\  -  /// |   |                       //
//                  | \_|  ''\---/''  |   |                       //
//                  \  .-\__  `-`  ___/-. /                       //
//                ___`. .'  /--.--\  `. . ___                     //
//              ."" '<  `.___\_<|>_/___.'  >'"".                  //
//            | | :  `- \`.;`\ _ /`;.`/ - ` : | |                 //
//            \  \ `-.   \_ __\ /__ _/   .-` /  /                 //
//      ========`-.____`-.___\_____/___.-`____.-'========         //
//                           `=---='                              //
//      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^        //
//             佛祖保佑          永无BUG         永不修改                	  //
////////////////////////////////////////////////////////////////////

springboot也可以这样就代替了原来springboot启动时的默认图形。
springboot也可以把启动的图标给关了,需要使用SpringApplicationBuilder

 SpringApplicationBuilder builder=new SpringApplicationBuilder(Springboot04WebRestfulcrudApplication.class);
    builder.bannerMode(Banner.Mode.OFF).run(args);
发布了314 篇原创文章 · 获赞 113 · 访问量 54万+

猜你喜欢

转载自blog.csdn.net/dream_follower/article/details/102761749