Ali Yassine
Ali Yassine

Reputation: 31

How to customize the spring boot banner?

Even though I am placing banner.txt in src/main/resources I am not able to customize the spring boot banner.

This is my directory tree :

D:.
├───.gradle
│   ├───4.8
│   │   ├───fileChanges
│   │   ├───fileContent
│   │   ├───fileHashes
│   │   └───taskHistory
│   ├───buildOutputCleanup
│   └───vcsWorkingDirs
├───build
│   ├───classes
│   │   └───java
│   │       └───main
│   │           └───hello
│   ├───libs
│   ├───resources
│   │   └───main
│   └───tmp
│       ├───bootJar
│       ├───compileJava
│       └───compileTestJava
├───gradle
│   └───wrapper
└───src
    └───main
        ├───java
        │   └───hello
        └───resources

I tried modifying properties but it did not work

Upvotes: 3

Views: 11309

Answers (2)

Alex
Alex

Reputation: 43

banner.txt is the default name and src/main/resourses is the default location but any can be used as long as it is configured in the properties file.

There are a couple reasons you could be having issues. There could be an error in your banner.txt file, so make sure that this file is correct. If no banner is showing at all then make sure you do not have the banner-mode setting turned off.

I would also just do a clean build to make sure your configurations have been updated.

Upvotes: 2

Rajdeep Mondal
Rajdeep Mondal

Reputation: 101

There is a easy way to change the default spring boot banner. Go to the below mentioned link -->

  1. https://patorjk.com/software/taag/#p=display&f=Graffiti&t=Type%20Something%20
  2. Type your text in the area provided and choose your desired style.
  3. Open your project in IDE(any) and create a .txt file and name it banner.txt and place it under scr/main/resources.
  4. Copy the ASCII Art from the step 1 and paste it in banner.txt file.
  5. Run your project. You are good to go.

Upvotes: 10

Related Questions