Use Criteria Queries in a Spring Data Application
1. Introduction Spring Data JPA provides many ways to deal with entities including query methods and custom JPQL queries. However, sometimes we need a more programmatic approach: for example Criteria...
View ArticleJBoss Server – How to Start and Stop?
1. Introduction In this tutorial, we’ll have a look at how to start and stop a JBoss application server. First, we’ll explore the operating modes of this server. Further, we’ll discuss how to start...
View ArticleWorking With Custom HTML Attributes in Thymeleaf
1. Overview In this tutorial, we look at how we can define custom attributes in HTML5 tags using Thymeleaf. It is a template engine framework which allows plain HTML to be used to display dynamic...
View ArticleReactive JAX-RS Client API
1. Introduction In this tutorial, we look at JAX-RS support for reactive (Rx) programming using the Jersey API. This article assumes the reader has knowledge of the Jersey REST client API. Some...
View ArticleJava Weekly, Issue 244
Here we go… 1. Spring and Java >> Optimistic locking in JPA/Hibernate [blog.arnoldgalovics.com] A good review of lost update anomalies and how to detect them using versioned and non-versioned...
View ArticleA Guide to Apache Crunch
1. Introduction In this tutorial, we’ll demonstrate Apache Crunch with an example data processing application. We’ll run this application using the MapReduce framework. We’ll start by covering briefly...
View ArticleJava Primitives versus Objects
1. Overview In this tutorial, we show the pros and cons of using Java primitive types and their wrapped counterparts. 2. Java Type System Java has a two-fold type system consisting of primitives such...
View Article@JoinColumn Annotation Explained
1. Introduction The annotation javax.persistence.JoinColumn marks a column for as a join column for an entity association or an element collection. In this quick tutorial, we’ll show some examples of...
View ArticleSorting a String Alphabetically in Java
1. Overview In this tutorial, we’ll show how to sort String alphabetically. There might be plenty of reason why we’d like to do it – one of them could be validation if two words are composed of the...
View ArticleDeploying a Spring Boot Application to Cloud Foundry
1. Overview Deploying a Spring Boot application to Cloud Foundry is a simple exercise. In this tutorial, we’ll show you how to do it. 2. Spring Cloud Dependencies Since this project will require new...
View ArticleConfiguring a Tomcat Connection Pool in Spring Boot
1. Overview Spring Boot is an opinionated – yet powerful – layer of abstraction placed on top of a plain Spring platform, which makes developing stand-alone and web applications a no-brainer. Spring...
View ArticleFind the Intersection of Two Lines in Java
1. Overview In this quick tutorial, we’ll show how to find the point of intersection of two lines defined by the linear functions in the slope-intercept form. 2. The Math Formula of Intersection Any...
View ArticleIntroduction to Spring Security Taglibs
1. Overview In this tutorial, we’ll take a look at Spring Security Taglibs, which provides basic support for accessing security information and applying security constraints in JSPs. 2. Maven...
View ArticleCheck If a String Contains All The Letters of The Alphabet
1. Overview In this tutorial, we’ll see how to check if a String contains all the letters of the alphabet or not. Here’s a quick example: “Farmer jack realized that big yellow quilts were expensive.”...
View ArticleSet a Response Body in JAX-RS
1. Overview To simplify the development of REST web services and their clients in Java, a standard and portable implementation of JAX-RS API has been designed which is called Jersey. Jersey is an open...
View ArticleAdd a Character to a String at a Given Position
1. Introduction In this quick tutorial, we’ll demonstrate how to add a character at any given position in a String in Java. We’ll present three implementations of a simple function which takes the...
View ArticleTime Complexity of Java Collections
1. Overview In this tutorial, we’ll talk about the performance of different collections from the Java Collection API. When we talk about collections, we usually think about the List, Map, and Set data...
View ArticleSpring Security for Spring Boot Integration Tests
1. Introduction The ability to execute integration tests without the need for a standalone integration environment is a valuable feature for any software stack. The seamless integration of Spring Boot...
View ArticleSynthetic Constructs in Java
1. Overview In this tutorial, we’ll take a look at Java’s synthetic constructs, code introduced by the compiler to transparently handle access to members which would be otherwise unreachable due to...
View ArticleLoad Spring Boot Properties From a JSON File
1. Introduction Use external configuration properties is quite a common pattern. And, one of the most common questions is the ability to change the behavior of our application in multiple environments...
View Article