SpringBoot – Custom Banner / Disable Banner

SpringBoot – Custom Banner / Disable Banner

Whenever we deploy the springboot application, it comes with default banner

We have an option to change this banner or even to disable this banner.

In order to disable this banner, we have to include a property in application.properties file

spring.main.banner-mode=off

If we include this property in application.properties file, SpringBoot banner will be disabled.

 

We can also customize the springboot banner as per our requirement. All we have to do is, Put the design required in a file and save it as banner.txt and paste it in resources folder along with application.properties.

Lets paste this design in banner.txt file,

Paste the banner.txt with application.properties in resources folder

Let us see the output,

Read More

Simple SpringBoot RestAPI Example

Simple SpringBoot RestAPI Example:
Spring Boot is a way to create stand-alone applications with less or no configurations and has defaults for annotation configuration which we will use in our application.

In this example, Let us a see a very simple SpringBoot with one RESTAPI url. This example does not have any database connection or pojo classes.

Structure:

 

POM.xml

SpringController.java

SpringRest.java

Let us start the spring boot application,

 

Hitting the URL with PostMan,

 

Read More