Spring Boot

How to configure Swagger in spring boot

How to configure Swagger in spring boot

Ashish Lahoti

Swagger library is useful if you are creating REST services in spring boot web application. Swagger user interface allows you to view REST services and execute GET, POST, PUT, DELETE HTTP endpoints. This is helpful since you do not need to use Postman or some other tool to test REST Apis.

Follow these steps to configure swagger in your spring boot application:-

How to create and configure custom banner in spring boot

How to create and configure custom banner in spring boot

Ashish Lahoti

Spring boot application comes with default banner which shows up first when you start your application.

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.1.3.RELEASE)

You can replace above banner with your self made custom banner in following two easy steps:-

How to disable command line properties in spring boot

How to disable command line properties in spring boot

Ashish Lahoti

Spring Boot Application converts any command line arguments starting with --, such as --spring.profiles.active=dev to a property by default and adds them to the Spring Environment. Command line properties always take precedence over other property sources.

If you do not want command line properties to be added to the Environment, you can disable them from SpringBootApplication main method as follows:-

How to disable default banner in spring boot

How to disable default banner in spring boot

Ashish Lahoti

You would have seen below spring boot banner when starting a spring boot application

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.1.3.RELEASE)

There are multiple ways to disable spring boot banner as follows: