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的更多相关文章

  1. SpringBoot系列——花里胡哨的banner.txt

    前言 我们注意到springboot项目启动时,控制台会打印自带的banner,然后对于部分IT骚年来说,太单调太普通太一般了:所以,是时候表演真正的技术了 项目结构 我们只需要在springboot ...

  2. Springboot 系列(八)动态Banner与图片转字符图案的手动实现

    使用过 Springboot 的对上面这个图案肯定不会陌生,Springboot 启动的同时会打印上面的图案,并带有版本号.查看官方文档可以找到关于 banner 的描述 The banner tha ...

  3. 32. Springboot 系列(八)动态Banner与图片转字符图案的手动实现

    使用过 Springboot 的对上面这个图案肯定不会陌生,Springboot 启动的同时会打印上面的图案,并带有版本号.查看官方文档可以找到关于 banner 的描述 The banner tha ...

  4. 【Java】SpringBoot 佛祖保佑banner.txt

    最新写代码有点多,拜拜佛祖,代码不出bug. 在springboot项目的resources文件夹下面创建一个banner.txt文件,springboot启动的时候默认会加载这个文件 ${AnsiC ...

  5. (28)SpringBoot启动时的Banner设置【从零开始学Spring Boot】

    对于使用过Spring Boot的开发者来说,程序启动的时候输出的由字符组成的Spring符号并不陌生.这个是Spring Boot为自己设计的Banner: 1.    .   ____       ...

  6. springboot系列之02-需要了解的宏观知识点

    未经允许,不得转载 原作者:字母哥博客 本文完整系列出自:springboot深入浅出系列 一.Spring Boot . Spring MVC .Spring对比 首先你需要明白一件事情:Sprin ...

  7. SpringBoot系列(二)入门知识

    SpringBoot系列(二)入门知识 往期推荐 SpringBoot系列(一)idea新建springboot项目 引言 本来新建springboot项目应该放在入门知识这一章的,但是由于新建spr ...

  8. 【springBoot】之定制Banner

    springboot启动时控制台打印图案如下: 1.假如我们不想看到这个图案 public static void main(String[] args) { SpringApplication ap ...

  9. springboot 修改和设置 banner

    springboot 修改和设置 banner 先上图 修改步骤 1.在src/main/resources下新建一个banner.txt文档 2.通过http://patorjk.com/softw ...

随机推荐

  1. JVM学习笔记-第六章-类文件结构

    JVM学习笔记-第六章-类文件结构 6.3 Class类文件的结构 本章中,笔者只是通俗地将任意一个有效的类或接口锁应当满足的格式称为"Class文件格式",实际上它完全不需要以磁 ...

  2. Eclipse的XML编辑器解决方案

    现在使用的Eclipse SDK 3.7.2里没有XML编辑器,无法进行语法高亮,也没有格式化(按层次控制缩进量)和设计视图,很不方便.对于ant文件,可以用Ant Editor来打开,ivy文件在装 ...

  3. Using Evernote with Wine on Mint

    Install Evernote Install Evernote in Wine: wine Evernote_xxx.exe; Backup Evernote Database File Loca ...

  4. WinForm嵌入Web网页的解决方案

    企业级信息化系统绝大部分采用BS架构实现,如门户网站.OA系统.电商网站等,通过浏览器输入Web网址即可访问,对于使用者来说非常便捷,对于开发维护者来说也非常方便,程序维护只需更新服务器即可,使用者无 ...

  5. Java角度制向弧度制转化

    1.第一次写博客啊写博客啊写啊写0.0..0. 2.输入正多边形的边长·边数·求正多边形的面积 3.超级简单,可是在转弧度制那里有点懵,刚开始学Java,所以难免走弯路 4.代码如下: 1 publi ...

  6. 教你IO流来便利电脑磁盘所有文件,把图片放到一个文件夹里(会发现什么不可告人的密码)

    一.需求 我要把C盘下面的所有图片都拿出来,放到一个新文件夹中.今天小编一身正气,看看有没有什么意外发现!!学会看看自己的盘,悄悄的哦!!! 二.代码展示(运行时间可能有点长) import java ...

  7. [转]C# 互操作性入门系列(三):平台调用中的数据封送处理

    参考网址:https://www.cnblogs.com/FongLuo/p/4512738.html C#互操作系列文章: C# 互操作性入门系列(一):C#中互操作性介绍 C# 互操作性入门系列( ...

  8. spring cloud 知识总结

    ### 单体应用存在的问题 - 随着业务的发展,开发变得越来越复杂.- 修改.新增某个功能,需要对整个系统进行测试.重新部署.- 一个模块出现问题,很可能导致整个系统崩溃.- 多个开发团队同时对数据进 ...

  9. 【java虚拟机】Java内存模型

    作者:平凡希 原文地址:https://www.cnblogs.com/xiaoxi/p/7518259.html 一.什么是Java内存模型 Java虚拟机规范中试图定义一种Java内存模型(Jav ...

  10. Jackson的使用和定制

    springmvc在使用注解@ResponseBody返回一个POJO对象时, 其内部会借助Jackson来完成POJO转化为JSON的工作. public class Message { priva ...