Skip to content

如何自定义Spring Boot启动Banner #29

Open
@lihengming

Description

@lihengming

The banner that is printed on start up can be changed by adding a banner.txt file to your classpath, or by setting banner.location to the location of such a file. If the file has an unusual encoding you can set banner.charset (default is UTF-8). In addition to a text file, you can also add a banner.gif, banner.jpg or banner.png image file to your classpath, or set a banner.image.location property. Images will be converted into an ASCII art representation and printed above any text banner.

Spring Boot 允许我们使用自定义的Banner,可以是文本或者图片格式,不过最终都会以ASCII的形式展现出来。你可以通过修改本项目resources目录下的banner.txt内的文本来更改它,下面这三个地址可以帮助你生成ASCII格式的文本。

更多关于Banner的信息,可以看看Spring Boot官方文档关于它的介绍,地址:http://docs.spring.io/spring-boot/docs/1.5.5.BUILD-SNAPSHOT/reference/htmlsingle/#boot-features-banner

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions