A Guide to the Hibernate Types Library
1. Overview In this tutorial, we'll take a look at Hibernate Types. This library provides us with a few types that are not native in the core Hibernate ORM. 2. Dependencies To enable Hibernate Types...
View ArticleComparing Objects in Java
1. Introduction Comparing objects is an essential feature of object-oriented programming languages. In this tutorial, we're going look at some of the features of the Java language that allow us to...
View ArticleSuper Type Tokens in Java Generics
1. Overview In this tutorial, we're going to get familiar with super type tokens and see how they can help us to preserve generic type information at runtime. 2. The Erasure Sometimes we need to convey...
View ArticleUsing Kafka MockConsumer
1. Overview In this tutorial, we'll explore the MockConsumer, one of Kafka‘s Consumer implementations. First, we'll discuss what are the main things to be considered when testing a Kafka Consumer....
View ArticleSpring Security With Auth0
1. Overview Auth0 provides authentication and authorization services for various types of applications like Native, Single Page Applications, and Web. Additionally, it allows for implementing various...
View ArticleRate Limiting a Spring API Using Bucket4j
1. Overview In this tutorial, we'll learn how to use Bucket4j to rate limit a Spring REST API. We'll explore API rate limiting, learn about Bucket4j and work through a few ways of rate limiting REST...
View ArticleHow to Inject Git Secrets in Jenkins
1. Introduction Jenkins is an excellent tool for automating software builds and deliveries, especially when using git for software configuration management. However, a common problem when using Jenkins...
View ArticleSetting Custom Feign Client Timeouts
1. Introduction Spring Cloud Feign Client is a handy declarative REST client, that we use to implement communication between microservices. In this short tutorial we'll show how to set a custom Feign...
View ArticleJava Weekly, Issue 335
1. Spring and Java >> Apache Arrow and Java: Lightning Speed Big Data Transfer [infoq.com] An intro to Apache Arrow – a columnar, in-memory data format designed for efficient transfer of big data...
View ArticleCasting int to Enum in Java
1. Overview In this tutorial, we'll look briefly at the different ways of casting an int to an enum value in Java. Although there's no direct way of casting, there are a couple of ways to approximate...
View ArticleConverting a BufferedReader to a JSONObject
1. Overview In this quick tutorial, we're going to show how to convert a BufferedReader to a JSONObject using two different approaches. 2. Dependency Before we get started, we need to add the org.json...
View ArticleSpring BeanPostProcessor
1. Overview So, in a number of other tutorials, we've talked about BeanPostProcessor. In this tutorial, we'll put them to use in a real-world example using Guava's EventBus. Spring's BeanPostProcessor...
View ArticleMulti-Release JAR Files with Maven
1. Introduction One of the new features that Java 9 brings us is the capability to build Multi-Release JARs (MRJAR). As the JDK Enhancement Proposal says, this allows us to have different Java...
View ArticlePartial Data Update with Spring Data
1. Introduction Spring Data's CrudRespository#save is undoubtedly simple, but one feature could be a drawback: It updates every column in the table. Such are the semantics of the U in CRUD, but what if...
View ArticleWhat Causes java.lang.OutOfMemoryError: unable to create new native thread
1. Introduction In this tutorial, we'll discuss the cause and possible remedies of the java.lang.OutOfMemoryError: unable to create new native thread error. 2. Understanding the Problem 2.1. Cause of...
View ArticleString Concatenation with Invoke Dynamic
1. Overview Compilers and runtimes tend to optimize everything, even the smallest and seemingly less critical parts. When it comes to these sorts of optimizations, JVM and Java have a lot to offer. In...
View ArticleQuick Guide to Spring Cloud Open Service Broker
1. Overview In this tutorial, we'll introduce the Spring Cloud Open Service Broker project and learn how to implement the Open Service Broker API. First, we'll dive into the specification of the Open...
View ArticleJava Weekly, Issue 336
1. Spring and Java >> Machine Learning in Java With Amazon Deep Java Library [infoq.com] A quick look at Amazon's JSR-381 implementation, which includes the Visual Recognition API and a...
View ArticleOpenAPI JSON Objects as Query Parameters
1. Overview In this tutorial, we'll learn how to work with JSON objects as query parameters using OpenAPI. 2. Query Parameters in OpenAPI 2 OpenAPI 2 doesn't support objects as query parameters; only...
View ArticleProxies With RestTemplate
1. Overview In this short tutorial, we'll take a look at how to send a request to a proxy using RestTemplate. 2. Dependencies First, the RestTemplateCustomizer uses the HttpClient class to connect to...
View Article