How to change default banner text in Spring Boot
In this tutorial, you will learn how to change the default Spring Boot banner text with your own custom banner text. When you execute your Spring Boot application, you might notice that there is a fancy “Spring” text printed in the console log.
You can override/replace the default “Spring” banner text with your custom text by following the below steps:
Similar Post: Spring Boot- Disable Spring banner at startup
Step 1: Design your custom banner or generate it from any online source. I have used Spring Boot banner.txt generator to create the custom banner.
,--. ,--. ,--.
| | | | ,---. | |-. ,---. ,---. ,--,--. ,--.--. ,--.--. ,---. ,--. ,--.
| |.'.| | | .-. : | .-. ' ( .-' | .-. | ' ,-. | | .--' | .--' | .-. | | |.'.| |
| ,'. | \ --. | `-' | .-' `) | '-' ' \ '-' | | | | | ' '-' ' | .'. |
'--' '--' `----' `---' `----' | |-' `--`--' `--' `--' `---' '--' '--'
`--'
Step 2: Open your Spring Boot application and create a banner.txt
file inside the src/main/resources
directory.
Step 3: Copy & paste the created/generated banner text in banner.txt
file.
Step 4: Restart the Spring Boot application and see the console log, it will start printing custom banner text.
,--. ,--. ,--.
| | | | ,---. | |-. ,---. ,---. ,--,--. ,--.--. ,--.--. ,---. ,--. ,--.
| |.'.| | | .-. : | .-. ' ( .-' | .-. | ' ,-. | | .--' | .--' | .-. | | |.'.| |
| ,'. | \ --. | `-' | .-' `) | '-' ' \ '-' | | | | | ' '-' ' | .'. |
'--' '--' `----' `---' `----' | |-' `--`--' `--' `--' `---' '--' '--'
`--'
[2m2022-03-26 13:56:18.290[0;39m [32m INFO[0;39m [35m103080[0;39m [2m---[0;39m [2m[ main][0;39m [36mo.w.SpringBootBannerApplication [0;39m [2m:[0;39m Starting SpringBootBannerApplication using Java 11.0.12 on ATUL with PID 103080 (F:\sts4-workspace\spring-boot-banner\target\classes started by Atul in F:\sts4-workspace\spring-boot-banner)
[2m2022-03-26 13:56:18.292[0;39m [32m INFO[0;39m [35m103080[0;39m [2m---[0;39m [2m[ main][0;39m [36mo.w.SpringBootBannerApplication [0;39m [2m:[0;39m No active profile set, falling back to 1 default profile: "default"
[2m2022-03-26 13:56:18.605[0;39m [32m INFO[0;39m [35m103080[0;39m [2m---[0;39m [2m[ main][0;39m [36mo.w.SpringBootBannerApplication [0;39m [2m:[0;39m Started SpringBootBannerApplication in 0.541 seconds (JVM running for 1.133)
References
- Customizing the Banner
- Spring Boot Security- Change default username and password parameter
- Spring Boot Security- How to change default login page