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:

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

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

修改内容如下:

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

在application.properties添加如下内容:

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

 

相关文章:

  • 2022-12-23
  • 2021-08-05
  • 2021-11-16
  • 2021-04-12
  • 2021-04-18
  • 2022-12-23
  • 2022-12-23
  • 2021-12-06
猜你喜欢
  • 2022-12-23
  • 2021-11-09
  • 2022-12-23
  • 2022-12-23
  • 2022-03-04
  • 2021-04-22
  • 2022-01-14
相关资源
相似解决方案