[转]SpringBoot系列——花里胡哨的banner.txt
Creating ASCII Text Banners from the Linux Command Line
In Ubuntu, Debian, Linux Mint etc.
$ sudo apt-get install figlet
In CentOS, RHEL, Fedora etc.
$ yum install figlet
Generate ASCII Text Banners
To use FIGlet with its default settings, simply type:
$ figlet "Shell Hacks"
____ _ _ _ _ _ _
/ ___|| |__ ___| | | | | | | __ _ ___| | _____
\___ \| '_ \ / _ \ | | | |_| |/ _` |/ __| |/ / __|
___) | | | | __/ | | | _ | (_| | (__| <\__ \
|____/|_| |_|\___|_|_| |_| |_|\__,_|\___|_|\_\___/
List FIGlet Fonts
Print a list of available FIGlet fonts:
$ showfigfonts
To change the font, use the -f option
, for example:
$ figlet -f small "Shell Hacks"
___ _ _ _ _ _ _
/ __| |_ ___| | | | || |__ _ __| |__ ___
\__ \ ' \/ -_) | | | __ / _` / _| / /(_-<
|___/_||_\___|_|_| |_||_\__,_\__|_\_\/__/
$ figlet -f digital "Shell Hacks"
+-+-+-+-+-+ +-+-+-+-+-+
|S|h|e|l|l| |H|a|c|k|s|
+-+-+-+-+-+ +-+-+-+-+-+
SpringBoot系列——花里胡哨的banner.txt
Spring Boot自定义Banner
banner.txt
这里有几个定制banner的网站,文字、图片都可以秀起来,怎么秀就看你的骚操作了
http://patorjk.com/software/taag
http://www.network-science.de/ascii/
http://www.degraeve.com/img2txt.php
${AnsiColor.BRIGHT_YELLOW}
////////////////////////////////////////////////////////////////////
// _ooOoo_ //
// o8888888o //
// 88" . "88 //
// (| ^_^ |) //
// O\ = /O //
// ____/`---'\____ //
// .' \\| |// `. //
// / \\||| : |||// \ //
// / _||||| -:- |||||- \ //
// | | \\\ - /// | | //
// | \_| ''\---/'' | | //
// \ .-\__ `-` ___/-. / //
// ___`. .' /--.--\ `. . ___ //
// ."" '< `.___\_<|>_/___.' >'"". //
// | | : `- \`.;`\ _ /`;.`/ - ` : | | //
// \ \ `-. \_ __\ /__ _/ .-` / / //
// ========`-.____`-.___\_____/___.-`____.-'======== //
// `=---=' //
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ //
// 佛祖保佑 永不宕机 永无BUG //
////////////////////////////////////////////////////////////////////
banner.txt配置
https://docs.spring.io/spring-boot/docs/2.1.0.RELEASE/reference/htmlsingle/#boot-features-banner
${AnsiColor.BRIGHT_RED}
:设置控制台中输出内容的颜色
${application.version}
:用来获取MANIFEST.MF
文件中的版本号
${application.formatted-version}
:格式化后的${application.version}
版本信息
${spring-boot.version}
:Spring Boot的版本号
${spring-boot.formatted-version}
:格式化后的${spring-boot.version}
版本信息
# BANNER
spring.banner.charset=UTF-8 # Banner file encoding.
spring.banner.location=classpath:banner.txt # Banner text resource location.
spring.banner.image.location=classpath:banner.gif # Banner image file location (jpg or png can also be used).
spring.banner.image.width=76 # Width of the banner image in chars.
spring.banner.image.height= # Height of the banner image in chars (default based on image height).
spring.banner.image.margin=2 # Left hand image margin in chars.
spring.banner.image.invert=false # Whether images should be inverted for dark terminal themes.
结束语
秀儿,是你吗?
banner默认开启,如果不想让它打印怎么办?
方法1,在main的run方法设置
/**
* 启动主类,springboot的入口
* springboot 默认扫描的类是在启动类的当前包和下级包
*/
@SpringBootApplication
public class SpringbootWebsocketSpringdataJpaApplication { public static void main(String[] args) {
SpringApplication springApplication = new SpringApplication(SpringbootWebsocketSpringdataJpaApplication.class);
//Banner.Mode.OFF 关闭
springApplication.setBannerMode(Banner.Mode.OFF);
springApplication.run(args);
}
}
方法2,Edit Configurations --> 勾选Hide banner
代码开源
代码已经开源、托管到我的GitHub、码云:
GitHub:https://github.com/huanzi-qch/springBoot
码云:https://gitee.com/huanzi-qch/springBoot
[转]SpringBoot系列——花里胡哨的banner.txt的更多相关文章
- SpringBoot系列——花里胡哨的banner.txt
前言 我们注意到springboot项目启动时,控制台会打印自带的banner,然后对于部分IT骚年来说,太单调太普通太一般了:所以,是时候表演真正的技术了 项目结构 我们只需要在springboot ...
- Springboot 系列(八)动态Banner与图片转字符图案的手动实现
使用过 Springboot 的对上面这个图案肯定不会陌生,Springboot 启动的同时会打印上面的图案,并带有版本号.查看官方文档可以找到关于 banner 的描述 The banner tha ...
- 32. Springboot 系列(八)动态Banner与图片转字符图案的手动实现
使用过 Springboot 的对上面这个图案肯定不会陌生,Springboot 启动的同时会打印上面的图案,并带有版本号.查看官方文档可以找到关于 banner 的描述 The banner tha ...
- 【Java】SpringBoot 佛祖保佑banner.txt
最新写代码有点多,拜拜佛祖,代码不出bug. 在springboot项目的resources文件夹下面创建一个banner.txt文件,springboot启动的时候默认会加载这个文件 ${AnsiC ...
- (28)SpringBoot启动时的Banner设置【从零开始学Spring Boot】
对于使用过Spring Boot的开发者来说,程序启动的时候输出的由字符组成的Spring符号并不陌生.这个是Spring Boot为自己设计的Banner: 1. . ____ ...
- springboot系列之02-需要了解的宏观知识点
未经允许,不得转载 原作者:字母哥博客 本文完整系列出自:springboot深入浅出系列 一.Spring Boot . Spring MVC .Spring对比 首先你需要明白一件事情:Sprin ...
- SpringBoot系列(二)入门知识
SpringBoot系列(二)入门知识 往期推荐 SpringBoot系列(一)idea新建springboot项目 引言 本来新建springboot项目应该放在入门知识这一章的,但是由于新建spr ...
- 【springBoot】之定制Banner
springboot启动时控制台打印图案如下: 1.假如我们不想看到这个图案 public static void main(String[] args) { SpringApplication ap ...
- springboot 修改和设置 banner
springboot 修改和设置 banner 先上图 修改步骤 1.在src/main/resources下新建一个banner.txt文档 2.通过http://patorjk.com/softw ...
随机推荐
- 单机版搭建kubernetes(K8s)
准备 云原生的概念越来越火,忍不住去看了看kubernetes,初次接触,晕晕乎乎的,于是不管三七二十一,先搭建个单机版的再说(没钱买服务器,目前也懒得装虚拟机),跑起来也算是第一步吧.网上教程一顿搜 ...
- NOIP 模拟 $28\; \rm 客星璀璨之夜$
题解 \(by\;zj\varphi\) 概率与期望,考虑 \(\rm dp\) 设 \(dp_{i,j}\) 为消除 \(i-j\) 这一段行星的期望,转移: 枚举 \(k\) 为当前状态下第一个撞 ...
- SpringBoot-2-1-6-集成activiti7-1-0-M4
pom.xml <dependencyManagement> <dependencies> <dependency> <groupId>org.acti ...
- 在JavaScript中安全访问嵌套对象
大多数情况下,当我们使用JavaScript时,我们将处理嵌套对象,并且通常我们需要安全地访问最里面的嵌套值. 比如: const user = { id: 101, email: 'jack@dev ...
- C# 异步锁
参考网址: https://www.cnblogs.com/Alicia-meng/p/13330640.html 使用SemaphoreSlim 实现 当多个任务或线程并行运行时,难以避免的对某些有 ...
- 在ASP.NET Core调用WebService
一.前言 现实生产中,有一些比较老的系统对外提供的接口都是WebService形式的,如果是使用.NET Framework创建的项目调用WebService非常方便,网上有很多代码示例,这里不在讲解 ...
- 【springboot】集成swagger
1.简介 本章介绍 SpringBoot2.1.9 集成 Swagger2 生成在线的API接口文档. 2. pom依赖: 通过对比了swagger的几个版本,发现还是2.6.1问题最少 <!- ...
- Nacos集群部署:
Nacos集群部署: 官网: https://nacos.io/zh-cn/docs/cluster-mode-quick-start.html 1: 下载 Nacos1.2.0 链接:http ...
- C#多线程---Semaphore实现线程同步
一.简介 Semaphore类限制可同时访问某一资源或资源池的线程数.线程通过调用 WaitOne方法将信号量减1,并通过调用 Release方法把信号量加1. 构造函数:public Semapho ...
- java实现全排列输出
java实现全排列输出 转自:http://easonfans.iteye.com/blog/517286 最近在找工作,面试java程序员或者软件工程师,在笔试的时候常常见到这么一道题:全排列 的输 ...