Customize Spring Boot's auto configurations

In this tutorial, we will customize the spring boot's auto configurations. This can be done in following ways:
  • Through program arguments
  • application.properties
  • application.yml
  • YAML is a serialization format that follows the hierarchical structure, which is in ways similar to JSON. It will contain key value pairs in a hierarchical format. And it is really popular in ruby. Spring dependencies have snake yaml jar which is responsible for parsing yaml.
Spring boot gives developers choices, often there are multiple methods to achieve the same thing in spring boot. This allows developers to pick their favorite approach.

Find this project on Github

https://github.com/javacodenet/springBootApplicationPropertiesDemo

pom.xml

Application.java

Through program arguments

application.properties

application.yml

Output







Comments

Popular posts from this blog

Generate Random values in Spring boot

Generate PDF From XML Or Java Object Using Apache FOP

Generate/Read an Excel file in Java using Apache POI