Version control systems play a vital role in tracking the history of changes in a codebase. Knowing how to write good commit messages is an essential skill if you wish to have your project’s history well documented.
Arguably one of the most noteworthy new features introduced in Java 8 was the Streams API. Java 9 offers two new stream operations—takeWhile and dropWhile.
Nearly all Spring projects that I have worked with make heavy use of field injection. This must be a popular approach because it is concise and reads well. But have you ever considered the downsides of field injection?
A while loop is a control flow statement that runs a piece of code multiple times. It consists of a loop condition and body. Java also has a do while loop.
The ternary operator is a form of syntactic sugar for if-then-else statements. It is also known as the conditional operator, which is perhaps a more meaningful name because it evaluates conditions like if does.
The if statement is the most basic conditional statement. It checks a condition, which is any boolean expression, and runs a block of code if it is true.
Dependency inversion principle states that we should depend upon abstractions. Taking that into account, time should also be considered as a dependency.
Spring Boot provides a type-safe way to handle configuration by allowing you to create a bean and populating it with property values from your configuration file.
Externalized configuration is essential if you wish to deploy the same deployable unit to different environments without modifying the source code. Spring Boot provides several easy methods of doing that.