You must have seen the text ASCII banner for Spring that is displayed in your Spring boot application when you start it, if you are wondering if you can have your custom banner displayed? well, yeah!! it's possible. All you need to do is,
Steps:
- Create your ASCII Banner.
- Save the banner under resources folder as banner.txt
Now when you start your application, you will see your custom banner.
/Users/dev/Library/Java/JavaVirtualMachines/openjdk-21.0.1/Contents/Home/bin/java -XX:TieredStopAtLevel=1 -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dspring.jmx.enabled=true -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true -Dmanagement.endpoints.jmx.exposure.include=* -javaagent:/Applications/IntelliJ IDEA.app/Contents/lib/idea_rt.jar=49588:/Applications/IntelliJ IDEA.app/Contents/bin -Dfile.encoding=UTF-8 -Dsun.stdout.encoding=UTF-8 -Dsun.stderr.encoding=UTF-8 -classpath /Users/dev/Documents/Java-Projects/demo/demo/build/classes/java/main:/Users/dev/Documents/Java-Projects/demo/demo/build/resources/main:/Users/dev/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter/3.2.3/15f3e03b0fd9570f90bdce9651610cc152534cf4/spring-boot-starter-3.2.3.jar:/Users/dev/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-autoconfigure/3.2.3/59db74eb4196885bb5a149417ab1ab51dc9b6952/spring-boot-autoconfigure-3.2.3.jar:/Users/dev/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot/3.2.3/b4aa6e3fdc4078fee4a4b9d702d9cc64e3fad1d4/spring-boot-3.2.3.jar:/Users/dev/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-logging/3.2.3/c186015229d7f5cbd30ea99bf903a8cede6d849f/spring-boot-starter-logging-3.2.3.jar:/Users/dev/.gradle/caches/modules-2/files-2.1/jakarta.annotation/jakarta.annotation-api/2.1.1/48b9bda22b091b1f48b13af03fe36db3be6e1ae3/jakarta.annotation-api-2.1.1.jar:/Users/dev/.gradle/caches/modules-2/files-2.1/org.springframework/spring-core/6.1.4/3b4dde8f55c3d5d4e948de64b866d7bb27e5a8d4/spring-core-6.1.4.jar:/Users/dev/.gradle/caches/modules-2/files-2.1/org.yaml/snakeyaml/2.2/3af797a25458550a16bf89acc8e4ab2b7f2bfce0/snakeyaml-2.2.jar:/Users/dev/.gradle/caches/modules-2/files-2.1/org.springframework/spring-context/6.1.4/765316bef55e41e4523f9b2780b8721ce5dd0fe2/spring-context-6.1.4.jar:/Users/dev/.gradle/caches/modules-2/files-2.1/ch.qos.logback/logback-classic/1.4.14/d98bc162275134cdf1518774da4a2a17ef6fb94d/logback-classic-1.4.14.jar:/Users/dev/.gradle/caches/modules-2/files-2.1/org.apache.logging.log4j/log4j-to-slf4j/2.21.1/d77b2ba81711ed596cd797cc2b5b5bd7409d841c/log4j-to-slf4j-2.21.1.jar:/Users/dev/.gradle/caches/modules-2/files-2.1/org.slf4j/jul-to-slf4j/2.0.12/eb5f48f782b41cc881b0bf1fb4d88ae2ff6d5b93/jul-to-slf4j-2.0.12.jar:/Users/dev/.gradle/caches/modules-2/files-2.1/org.springframework/spring-jcl/6.1.4/a244bd674a5431dfdce68d28cdf857104e6fff67/spring-jcl-6.1.4.jar:/Users/dev/.gradle/caches/modules-2/files-2.1/org.springframework/spring-aop/6.1.4/26ae2c9e7f69b0235a2faca1c58416c51eaebef6/spring-aop-6.1.4.jar:/Users/dev/.gradle/caches/modules-2/files-2.1/org.springframework/spring-beans/6.1.4/e311cc9937d522a1051622580b4a2c250fc74164/spring-beans-6.1.4.jar:/Users/dev/.gradle/caches/modules-2/files-2.1/org.springframework/spring-expression/6.1.4/a1f2e3af83c7222b7f95f68a8e0666fdcceb35e1/spring-expression-6.1.4.jar:/Users/dev/.gradle/caches/modules-2/files-2.1/io.micrometer/micrometer-observation/1.12.3/105f768c211564fcebe4d79419bda4ebef0d0ac7/micrometer-observation-1.12.3.jar:/Users/dev/.gradle/caches/modules-2/files-2.1/ch.qos.logback/logback-core/1.4.14/4d3c2248219ac0effeb380ed4c5280a80bf395e8/logback-core-1.4.14.jar:/Users/dev/.gradle/caches/modules-2/files-2.1/org.slf4j/slf4j-api/2.0.12/48f109a2a6d8f446c794f3e3fa0d86df0cdfa312/slf4j-api-2.0.12.jar:/Users/dev/.gradle/caches/modules-2/files-2.1/org.apache.logging.log4j/log4j-api/2.21.1/74c65e87b9ce1694a01524e192d7be989ba70486/log4j-api-2.21.1.jar:/Users/dev/.gradle/caches/modules-2/files-2.1/io.micrometer/micrometer-commons/1.12.3/83add2dda5cdc811fefb83e858c7412a176fe5b1/micrometer-commons-1.12.3.jar org.code2care.demo.DemoApplication
##### #####
# # #### ##### ###### # # #### ## ##### ######
# # # # # # # # # # # # # #
# # # # # ##### ##### # # # # # #####
# # # # # # # # ###### ##### #
# # # # # # # # # # # # # # #
##### #### ##### ###### ####### #### # # # # ######
2024-02-26T17:23:33.013+05:30 INFO 2653 --- [ main] org.code2care.demo.DemoApplication : Starting DemoApplication using Java 21.0.1 with PID 2653 (/Users/dev/Documents/Java-Projects/demo/demo/build/classes/java/main started by dev in /Users/dev/Documents/Java-Projects/demo/demo)
2024-02-26T17:23:33.015+05:30 INFO 2653 --- [ main] org.code2care.demo.DemoApplication : No active profile set, falling back to 1 default profile: "default"
2024-02-26T17:23:33.302+05:30 INFO 2653 --- [ main] org.code2care.demo.DemoApplication : Started DemoApplication in 0.533 seconds (process running for 1.005)
Process finished with exit code 0
Facing issues? Have Questions? Post them here! I am happy to answer!
Author Info:
Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.
Follow him on: X
You can also reach out to him via e-mail: rakesh@code2care.org
More Posts related to Java,
- Get the current timestamp in Java
- Java Stream with Multiple Filters Example
- Java SE JDBC with Prepared Statement Parameterized Select Example
- Fix: UnsupportedClassVersionError: Unsupported major.minor version 63.0
- [Fix] Java Exception with Lambda - Cannot invoke because object is null
- 7 deadly java.lang.OutOfMemoryError in Java Programming
- How to Calculate the SHA Hash Value of a File in Java
- Java JDBC Connection with Database using SSL (https) URL
- How to Add/Subtract Days to the Current Date in Java
- Create Nested Directories using Java Code
- Spring Boot: JDBCTemplate BatchUpdate Update Query Example
- What is CA FE BA BE 00 00 00 3D in Java Class Bytecode
- Save Java Object as JSON file using Jackson Library
- Adding Custom ASCII Text Banner in Spring Boot Application
- [Fix] Java: Type argument cannot be of primitive type generics
- List of New Features in Java 11 (JEPs)
- Java: How to Add two Maps with example
- Java JDBC Transition Management using PreparedStatement Examples
- Understanding and Handling NullPointerException in Java: Tips and Tricks for Effective Debugging
- Steps of working with Stored Procedures using JDBCTemplate Spring Boot
- Java 8 java.util.Function and BiFunction Examples
- The Motivation Behind Generics in Java Programming
- Get Current Local Date and Time using Java 8 DateTime API
- Java: Convert Char to ASCII
- Deep Dive: Why avoid java.util.Date and Calendar Classes
More Posts:
- How to Create AWS SNS Topic using AWS CLI - AWS
- What is the Max and Minimum Value of int type in Python? - Python
- Add Bookmark macOS Safari - MacOS
- How to Clear Cache for a website (URL) in Safari for Mac - MacOS
- Java Generics explained with simple definition and examples - Java
- Bash Command to Download a File From URL - Bash
- PHP Code for sending Emails - PHP
- Fix: Invalid Gradle JDK configuration found. Could not find the required JavaSDK - Gradle