我们发现运行springboot项目时会在后台打印一下内容
Connected to the target VM, address: '127.0.0.1:52714', transport: 'socket'
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.1.1.RELEASE)
如果嫌他麻烦,不想用,可以关闭banner:
方法一:
SpringApplication app = new SpringApplication(DemoApplication.class);
app.setBannerMode(Banner.Mode.OFF);
app.run(args);
方法二:
new SpringApplicationBuilder(DemoApplication.class).bannerMode(Banner.Mode.OFF).run(args);
如果想更改banner的内容:
在src/main/resources下新建banner.txt的文件
通过http://patorjk.com/software/taag生成字符,并将生成的字符复制到banner.txt文件中
重新启动即可获得新的banner样式了