REST vs. gRPC
1. Overview In this article, we’ll compare REST and gRPC, two architectural styles for web APIs. 2. What Is REST? REST (Representational State Transfer) is an architectural style that provides...
View ArticleJava Weekly, Issue 405
1. Spring and Java >> Multiple ways to configure Spring [blog.frankel.ch] A practical guide on different approaches to configure Spring applications: from files to config classes to Kotlin DSLs!...
View ArticleSpring Security – Request Rejected Exception
1. Introduction Spring Framework versions 5.0 to 5.0.4, 4.3 to 4.3.14, and other older versions had a directory or path traversal security vulnerability on Windows systems. Misconfiguring the static...
View ArticleBuild a Dashboard With Cassandra, Astra and CQL – Mapping Event Data
1. Introduction In our previous article, we looked at augmenting our dashboard to store and display individual events from the Avengers using DataStax Astra, a serverless DBaaS powered by Apache...
View ArticleConvert Long to String in Java
1. Overview In this short tutorial, we'll learn how to convert Long to String in Java. 2. Use Long.toString() For example, suppose we have two variables of type long and Long (one of primitive type and...
View ArticleGet the Last Word of a String
1. Overview In this short tutorial, we'll learn how to get the last word of a String in Java using two approaches. 2. Using the split() Method The split() instance method from the String class splits...
View ArticleUsing a Custom Class as a Key in a Java HashMap
1. Overview In this article, we'll learn how HashMap internally manages key-value pairs and how to write custom key implementations. 2. Key Management 2.1. Internal Structure Maps are used to store...
View ArticleError Handling in gRPC
1. Overview gRPC is a platform to do inter-process Remote Procedure Calls (RPC). It's highly performant and can run in any environment. In this tutorial, we'll focus on gRPC error handling using Java....
View ArticleHibernate’s “Object References an Unsaved Transient Instance” Error
1. Overview In this tutorial, we'll see how to solve a common Hibernate error – “org.hibernate.TransientObjectException: object references an unsaved transient instance”. We get this error from the...
View ArticleGenerate a WAR File in Maven
1. Overview Web application resources or web application archives are commonly called WAR files. A WAR file is used to deploy a Java EE web application in an application server. Inside a WAR file, all...
View ArticleJava Weekly, Issue 406
1. Spring and Java >> Gavin Bierman explains pattern matching for switch, a Java 17 preview [blogs.oracle.com] An interview about what pattern matching is, how it affects the way we code, and...
View ArticleServerless Architecture with Knative
1. Introduction In this tutorial, we'll explore how to deploy a serverless workload on the Kubernetes platform. We'll use Knative as the framework to perform this task. In the process, we'll also learn...
View ArticleSpring Boot vs Quarkus
1. Overview In this article, we'll make a simple comparison between two well-known Java frameworks, Spring Boot and Quarkus. At the end of it, we'll have a better understanding of the differences and...
View ArticleLooking for a Java/Spring Technical Editor for Baeldung
This is not the typical code-focused style of article I usually publish here on Baeldung. Jumping right into it – the site is growing, more and more developers are applying to become authors, and the...
View ArticleGuide to Using ModelMapper
1. Introduction In a previous tutorial, we've seen how to map lists with ModelMapper. In this tutorial, we're going to show how to map our data between differently structured objects in ModelMapper....
View ArticleCassandra Frozen Keyword
1. Overview In this tutorial, we'll be talking about the frozen keyword in the Apache Cassandra database. First, we'll show how to declare the frozen collections or user-defined types (UDTs). Next,...
View ArticleTrusting All Certificates in OkHttp
1. Overview In this tutorial, we'll see how to create and configure an OkHttpClient to trust all certificates. Take a look at our articles about OkHttp for more specifics on the library. 2. Maven...
View ArticleUpdate the Value Associated With a Key in a HashMap
1. Overview This tutorial will go through the different approaches for updating the value associated with a given key in a HashMap. First, we'll look at some common solutions using only those features...
View ArticleGet a Field’s Annotations Using Reflection
1. Overview In this tutorial, we'll learn how to get a field's annotations. Additionally, we'll explain how the retention meta-annotation works. Afterward, we'll show the difference between two methods...
View ArticleJava Weekly, Issue 407
1. Spring and Java >> Faster Maven builds in Docker [blog.frankel.ch] Faster Maven builds are always good. Especially when you have a repo that takes an hour and a half to build >> Fetching...
View Article