Spring Boot YAML example
In this article, we will show you how to use YAML instead of properties file in Spring Boot. Tested with :Spring Boot 2.1.2.RELEASE, Maven 3, Snakeyaml:jar:1.23 . In short, create…
Favourite tutorials for developers
Java is a high-level, class-based, object-oriented programming language that is designed to have as few implementation dependencies as possible. It is a general-purpose programming language intended to let programmers write once, run anywhere (WORA), meaning that compiled Java code can run on all platforms that support Java without the need to recompile.
In this article, we will show you how to use YAML instead of properties file in Spring Boot. Tested with :Spring Boot 2.1.2.RELEASE, Maven 3, Snakeyaml:jar:1.23 . In short, create…
In this tutorial, we will show you how to set a default value for @Value . To set a default value in Spring expression, use Elvis operator : #{expression?:default value}…
In Spring, you can use @PropertySource annotation to externalize your configuration to a properties file. In this tutorial, we will show you how to use @PropertySource to read a properties…
The Spring framework , created by Rod Johnson, is an extremely powerful Inversion of control(IoC) framework to help decouple your project components’ dependencies. In this series of tutorials, it’s provides…
A Spring Boot web application example, using embedded Tomcat + JSP template, and package as an executable WAR file. Technologies used : Spring Boot 1.4.2.RELEASE, Spring 4.3.4.RELEASE, Tomcat Embed 8.5.6,…
In this tutorial, we will show you how to include static resources like JavaScript or CSS in a JSP page. Summary steps : 1 - Put static resources like cs,…
In this article, we will show you how to develop a Spring Boot web application, using Thymeleaf view, embedded Tomcat and package it as an executable JAR file. Technologies used…
Spring Boot @ConfigurationProperties is letting developer maps the entire .properties and yml file into an object easily. Normally, we use the @Value to inject the .properties value one by one,…
In this article, we will show you how to test the Spring Boot REST application. Normally, we use the MockMvc or TestRestTemplate for the integration test. Technologies used :Spring Boot…
In this article, we will show you error handling in Spring Boot REST application. Technologies used :Spring Boot 2.1.2.RELEASE, Spring 5.1.4.RELEASE, Maven 3, Java 8