In this tutorial, we’ll compare Spring Boot Configuration using YAML file and Property file and their advantages one over the other.
In this article, we’ll learn how to use @ConfigurationProperties with .yml file instead of .properties file for configuration in Spring Boot Project.
In this article, we’ll learn how to install Spring Tool Plugin for Eclipse IDE to create a Spring Boot Project from Scratch using Spring Initializr.
This article demonstrate use of Spring @Value annotation with Primitives, Default value, Dates, List, Map, System Properties, Constructor Injection, Setter Injection, and Methods…
In this article, we’ll learn how to create a Spring Boot project quickly from scratch use Spring Initializer.
Spring boot use tomcat as default embedded tomcat server to run a web application but you can configure jetty server to replace tomcat in easy steps.
In spring boot microservices based application, where microservices talks to each other using RESTFul APIs. We can expose some important information about microservice such as name, version, description over some endpoints say /info and also realtime status or health over some endpoint say /health to create application dashboards, realtime alerts, track microservice updates and so on…
When you create a Spring
@RestController in a Spring Boot application to define API endpoints then it renders JSON response by default if jackson2 is in classpath.
JSON responses are not pretty print by default but you can enable it with just one property change.
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:-
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:-