啟動效果

步驟
新建Spring Boot工程
在/src/main/resources目錄下創(chuàng)建一個banner.txt文件
-
將ASCII字符畫復(fù)制進(jìn)去,就能替換默認(rèn)的banner了
${AnsiColor.BRIGHT_YELLOW} //////////////////////////////////////////////////////////////////// // _ooOoo_ // // o8888888o // // 88" . "88 // // (| ^_^ |) // // O\ = /O // // ____/`---'\____ // // .' \\| |// `. // // / \\||| : |||// \ // // / _||||| -:- |||||- \ // // | | \\\ - /// | | // // | \_| ''\---/'' | | // // \ .-\__ `-` ___/-. / // // ___`. .' /--.--\ `. . ___ // // ."" '< `.___\_<|>_/___.' >'"". // // | | : `- \`.;`\ _ /`;.`/ - ` : | | // // \ \ `-. \_ __\ /__ _/ .-` / / // // ========`-.____`-.___\_____/___.-`____.-'======== // // `=---=' // // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // // 佛祖保佑 永不宕機(jī) 永無BUG // //////////////////////////////////////////////////////////////////// -
從上面的內(nèi)容中可以看到,還使用了一些屬性設(shè)置:
-
${AnsiColor.BRIGHT_RED}:設(shè)置控制臺中輸出內(nèi)容的顏色 -
${application.version}:用來獲取MANIFEST.MF文件中的版本號 -
${application.formatted-version}:格式化后的${application.version}版本信息 -
${spring-boot.version}:Spring Boot的版本號 -
${spring-boot.formatted-version}:格式化后的${spring-boot.version}版本信息
-
生成ASCII字符網(wǎng)站
- http://patorjk.com/software/taag
- http://www.degraeve.com/img2txt.php
- http://www.network-science.de/ascii/

image