SpringBoot2.x个性化启动banner设置和debug日志

3、SpringBoot2.x个性化启动banner设置和debug日志

简介:自定义应用启动的趣味性日志图标和查看调试日志

1、启动获取更多信息 java -jar xxx.jar --debug

2、修改启动的banner信息

1)在类路径下增加一个banner.txt,里面是启动要输出的信息

2)在applicatoin.properties增加banner文件的路径地址 

spring.banner.location=banner.txt

3)官网地址 https://docs.spring.io/spring-boot/docs/2.1.0.BUILD-SNAPSHOT/reference/htmlsingle/#boot-features-banners

示例:

默认Banner:

扫描二维码关注公众号,回复: 4806342 查看本文章

在 src/main/resources下创建banner.txt

修改内容如下:

在application.properties添加如下内容:

猜你喜欢

转载自www.cnblogs.com/116970u/p/10230475.html