0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

[Spring Boot] Customなバナーを作ってみよう

Posted at

バナーの作り方

org.springframework.boot.Bannerインターフェイスを実現してカスタムバーナーを開発

@SpringBootApplication
public class SampleApplication {

    public static void main(String[] args) {
        SpringApplication springApplication = new SpringApplication(SampleApplication.class);
        springApplication.setBanner((environment, sourceClass, out)->{
            out.println("Spring Boot! Corn!");
        });
        springApplication.run(args);
    }
}

src/main/resourc/banner.txtファイルを作成してbannerを代替

http://patorjk.com/software/taag/#p=display&f=Graffiti&t=Type
サイトでテキストを素敵なアスキー文字に変えてからスプリングブートバナーに登録しよう!!

1.png

Bannerで表示できる変数

${application.version}: MANIFEST.MF に設定された Implementation-Version
${application.formatted-version}: ${application.version} 
${spring-boot.version}: 使用されているSpring Bootバージョン
${spring-boot.formatted-version}: ${spring-boot.version} 
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?