Vue.js Frontend with a Spring Boot Backend
1. Overview In this tutorial, we’ll go over an example application that renders a single page with a Vue.js frontend, while using Spring Boot as a backend. We’ll also utilize Thymeleaf to pass...
View ArticleRemove the First Element from a List
1. Overview In this super-quick tutorial, we’ll show how to remove the first element from a List. We’ll perform this operation for two common implementations of the List interface – ArrayList and...
View ArticleSpring Session With JDBC
1. Overview In this quick tutorial, we’ll learn how to use the Spring session JDBC to persist session information to a database. For demonstration purposes, we’ll be using an in-memory H2 database. 2....
View ArticleGet a Random Number in Kotlin
1. Introduction This short tutorial will demonstrate how to generate a random number using Kotlin. 2. Random number using java.lang.Math The easiest way to generate a random number in Kotlin is to use...
View ArticleAuto-import Classes in IntelliJ
1. Overview This brief tutorial will describe each option of IntelliJ IDEA’s ‘auto-import’ feature. 2. Auto-import There are several options in IntelliJ IDEA that we may configure in Settings >...
View ArticleAdd Multiple Items to an Java ArrayList
1. Overview of ArrayList In this quick tutorial, we’ll show to how to add multiple items to an already initialized ArrayList. For an introduction to the use of the ArrayList, please refer to this...
View ArticleHow to Filter a Collection in Java
1. Overview In this short tutorial, we’ll have a look at different ways of filtering a Collection in Java – that is, finding all the items that meet a certain condition. This is a fundamental task...
View ArticleDisplay RSS Feed with Spring MVC
1. Introduction This quick tutorial will show how to build a simple RSS feed using Spring MVC and the AbstractRssFeedView class. Afterward, we’ll also implement a simple REST API – to expose our feed...
View ArticleParsing YAML with SnakeYAML
1. Overview In this tutorial, we’ll learn how to use SnakeYAML library to serialize Java objects to YAML documents and vice versa. 2. Project Setup In order to use SnakeYAML in our project, we’ll add...
View ArticleA Guide to JavaFaker
1. Overview JavaFaker is a library that can be used to generate a wide array of real-looking data from addresses to popular culture references. In this tutorial, we’ll be looking at how to use...
View ArticleA Simple Guide to Connection Pooling in Java
1. Overview Connection pooling is a well-known data access pattern, whose main purpose is to reduce the overhead involved in performing database connections and read/write database operations. In a...
View ArticleSpring MVC Streaming and SSE Request Processing
1. Introduction This simple tutorial demonstrates the use of several asynchronous and streaming objects in Spring MVC 5.x.x. Specifically, we’ll review three key classes: ResponseBodyEmitter...
View ArticleJava Weekly, Issue 240
Here we go… 1. Spring and Java >> WireMock Tutorial: Request Matching, Part Four [petrikainulainen.net] A nice write-up that shows how to specify expectations for XML documents received by a web...
View ArticleLogging Exceptions Using SLF4J
1. Overview In this quick tutorial, we’ll show how to log exceptions in Java using the SLF4J API. We’ll use the slf4j-simple API as the logging implementation. You can explore different logging...
View ArticleCreating a Custom Log4j2 Appender
1. Introduction In this tutorial, we’ll learn about creating a custom Log4j2 appender. If you’re looking for the introduction to Log4j2, please take a look at this article. Log4j2 ships with a lot of...
View ArticleMQTT Client in Java
1. Overview In this tutorial, we’ll see how we can add MQTT messaging in a Java project using the libraries provided by the Eclipse Paho project. 2. MQTT Primer MQTT (MQ Telemetry Transport) is a...
View ArticleSample Application with Spring Boot and Vaadin
1. Overview Vaadin is a server-side Java framework for creating web user interfaces. In this tutorial, we’ll explore how to use a Vaadin based UI on a Spring Boot based backend. For an introduction to...
View ArticleThread Safe LIFO Data Structure Implementations
1. Introduction In this tutorial, we’ll discuss various options for Thread-safe LIFO Data structure implementations. In the LIFO data structure, elements are inserted and retrieved according to the...
View ArticleCustom Validation MessageSource in Spring Boot
1. Overview MessageSource is a powerful feature available in Spring applications. This helps application developers handle various complex scenarios with writing much extra code, such as...
View ArticleJava Weekly, Issue 241
Here we go… 1. Spring and Java >> Spring Boot – Best Practices [e4developer.com] This primer can help jumpstart your journey down the road of Spring Boot. >> It’s time! Migrating to Java...
View Article