Learn Spring Boot
Spring Boot – Basics >> Spring Boot Tutorial – Bootstrap a Simple Application >> Spring Boot Annotations >> Intro to Spring Boot Starters >> Spring Boot Actuator >>...
View ArticleBinding a List in Thymeleaf
1. Overview In this quick tutorial, we’re going to show how to bind a List object in Thymeleaf. To learn how to integrate Thymeleaf with Spring, you can check out our main Spring article here – where...
View ArticleWorking with Enums in Kotlin
1. Overview In this tutorial, we’ll deep dive into Kotlin enums. With the evolution of programming languages, the usage and application of enums have also advanced. Enum constants today aren’t just...
View ArticleJava EE 8 Security API
1. Overview The Java EE 8 Security API is the new standard and a portable way of handling security concerns in Java containers. In this article, we’ll look at the three core features of the API: HTTP...
View ArticleHistograms with Apache Commons Frequency
1. Overview In this tutorial, we’re going to look at how we can present data on a histogram with the help of Apache Commons Frequency class. The Frequency class is part of part of the Apache Commons...
View ArticleGuide to the java.util.Arrays Class
1. Introduction In this tutorial, we’ll take a look at java.util.Arrays, a utility class that has been part of Java since Java 1.2. Using Arrays, we can create, compare, sort, search, stream, and...
View ArticleGeneralized Target-Type Inference in Java
1. Introduction Type Inference was introduced in Java 5 to complement the introduction of generics and was substantially expanded in following Java releases, which is also referred to as Generalized...
View ArticleThin JARs with Spring Boot
1. Introduction In this tutorial, we’re going to look at how to build a Spring Boot project into a thin JAR file, using the spring-boot-thin-launcher project. Spring Boot is known for its “fat” JAR...
View ArticleLearn JUnit
JUnit – Testing Basics >> A Guide to JUnit 5 >> JUnit 5 @Test Annotation >> @Before vs @BeforeClass vs @BeforeEach vs @BeforeAll >> Assert an Exception is Thrown in JUnit 4 and...
View ArticleJava Weekly, Issue 233
Here we go… 1. Spring and Java >> Unlocking Intersection Types With ‘var’ In Java 10 [blog.codefx.org] As a side effect of introducing “var” to Java, we also got the support for intersection...
View ArticleBootstrapping JPA Programmatically in Java
1. Overview Most JPA-driven applications make heavy use of the “persistence.xml” file for getting a JPA implementation, such as Hibernate or OpenJPA. Our approach here provides a centralized mechanism...
View ArticleControlling Bean Creation Order with @DependsOn Annotation
1. Overview Spring, by default, manages beans’ lifecycle and arranges their initialization order. But, we can still customize it based on our needs. We can choose either the SmartLifeCycle interface...
View ArticleFind the Middle Element of a Linked List
1. Overview In this tutorial, we’re going to explain how to find the middle element of a linked list in Java. We’ll introduce the main problems in the next sections, and we’ll show different...
View ArticleConvert String to Date in Java
1. Overview In this tutorial, we’ll explore several ways to convert String objects into Date objects. We’ll start with the new Date Time API – java.time that was introduced in Java 8 before looking at...
View ArticleSpring Shutdown Callbacks
1. Overview In this tutorial, we’re going to learn different ways to use shutdown callbacks with Spring. The main advantage of using a shutdown callback is that it gives us control over a graceful...
View ArticleCount with JsonPath
1. Overview In this quick tutorial, we’ll explore how to use JsonPath to count objects and arrays in a JSON document. JsonPath provides a standard mechanism to traverse through specific parts of a...
View ArticleFront-End App with Spring Security OAuth – Authorization Code Flow
1. Overview In this tutorial, we’ll continue our Spring Security OAuth series by building a simple front end for Authorization Code flow. Keep in mind that the focus here is the client-side; have a...
View ArticleImplementing a FTP-Client in Java
1. Overview In this tutorial, we’ll take a look at how to leverage the Apache Commons Net library to interact with an external FTP server. 2. Setup When using libraries, that are used to interact with...
View ArticleAccess a File from the Classpath in a Spring Application
1. Introduction In this tutorial, we’ll see various ways to access and load the contents of a file that’s on the classpath using Spring. 2. Using Resource The Resource interface helps in abstracting...
View ArticleWarning: “The type WebMvcConfigurerAdapter is deprecated”
1. Introduction In this quick tutorial, we’ll have a look at one of the warnings we may see when working with a Spring 5.x.x version, namely the one referring to the deprecated WebMvcConfigurerAdapter...
View Article