Category: Spring Boot
Spring Boot – Spring Data JPA with Hibernate and H2 Web Console
The H2 database provides a browser-based web console that Spring Boot can auto-configure for you. In order to let spring auto-configure the H2 Web Console, we have to make sure we are developing a...
Spring Boot – Managing Profiles with @Profile Annotation Example
Spring Profiles provides a way to segregate parts of your application configuration and make it only available in certain environments. This is particularly useful when configuring different environments like development and/or production. In the...
Spring Boot – @ConfigurationProperties Annotation Example
Spring Boot allows you to externalize your configuration so you can work with the same application code in different environments. You can use properties files, YAML files, environment variables and command-line arguments to externalize...
Spring Boot – Passing Command Line Arguments Example
Command Line Arguments can be used to configure your application, pass data at runtime, or to overwrite default configuration options. By default SpringApplication will convert any command line option arguments (starting with ‘–‘, e.g....
Spring Boot – Random Configuration Property Values
In this tutorial we demonstrate how to generate random property values for configuration properties using Spring Boot. The RandomValuePropertySource class is added – by spring boot – to the classpath. We can use it...
Spring Boot – Create Executable using Maven without Parent Pom
Not everyone likes inheriting from the spring-boot-starter-parent POM to create an executable jar/war. You may have your own corporate standard parent that you need to use, or you may just prefer to explicitly declare...
Spring Boot – Create Executable using Maven with Parent Pom
Maven users can inherit from the spring-boot-starter-parent project to obtain sensible defaults. You should only need to specify the Spring Boot version number on this dependency. If you import additional starters, you can safely...
Spring boot – Create a Custom Banner Example
You can change the mission critical banner that is printed on start up with your own custom banner. You have the option to add your own custom banner.txt text file by setting the banner.location...