Java Weekly, Issue 553
1. Spring and Java >> Is Java Still Relevant Nowadays? [jetbrains.com] Well… it turns out that yes. Not surprised >> Creating a Command Line Tool with JBang and PicoCLI to Generate Release...
View ArticleA Guide to @MockBeans
1. Overview In this quick tutorial, we’ll explore the usage of the Spring Boot @MockBeans annotation. 2. Example Setup Before we dive in, let’s create a simple ticket validator example we’ll use...
View ArticleHow to Convert XLSX File to CSV in Java
1. Overview XLSX is a popular spreadsheet format created by Microsoft Excel, known for its ability to store complex data structures such as formulas and graphs. In contrast, CSV, or Comma-Separated...
View ArticleGenerate Values for Entity Attributes in Hibernate
1. Overview When building our persistence layer with Hibernate, we often need to generate or populate certain entity attributes automatically. This can include assigning default values, generating...
View ArticleHibernate Reactive and Quarkus
1. Overview Creating reactive applications for large-scale, high-performance systems has become increasingly essential in Java development. Hibernate Reactive and Quarkus are powerful tools that enable...
View ArticleJava Strip Methods
1. Overview In this tutorial, we’ll explore the various strip methods in the String class. We’ll demonstrate their use and understand under which circumstances we should use one over another. Finally,...
View ArticleConvert a ResultSet From PostgreSQL Array to Array of Strings
1. Introduction PostgreSQL arrays are a feature that allows us to store multiple values in a single column. However, when retrieving these arrays in Java, we may need to convert them to a more...
View ArticleCheck if all Elements in an Array are Equal in Java
1. Overview When working with arrays in Java, there are situations where we need to verify if all elements in an array are equal. In this tutorial, we’ll explore how to check if all elements in an...
View ArticleIN Clause Parameter Padding in Hibernate
1. Overview When building our persistence layer, optimizing database query performance is an important requirement. One technique databases use to improve query performance is SQL statement caching,...
View ArticleJava Class.cast() vs. Cast Operator
1. Introduction Casting in Java is a fundamental concept that allows one data type to be converted into another. It’s a crucial process to manipulate objects and variables in a program efficiently. In...
View ArticleBest Practices for Sizing the JDBC Connection Pool
1. Introduction In this tutorial, we’ll discuss the best strategies for sizing the JDBC connection pool. 2. What Is a JDBC Connection Pool, and Why Is It Used? A JDBC connection pool is a mechanism...
View ArticleRemoving ROLE_ Prefix in Spring Security
1. Overview Sometimes, when configuring application security, our user details might not include the ROLE_ prefix that Spring Security expects. As a result, we encounter “Forbidden” authorization...
View ArticleJava Enums With All HTTP Status Codes
1. Introduction Enums provide a powerful way to define a set of named constants in the Java programming language. These are useful for representing fixed sets of related values, such as HTTP status...
View ArticleBuild a Conversational AI With Apache Camel, LangChain4j, and WhatsApp
1. Overview In this tutorial, we’ll see how to integrate Apache Camel and LangChain4j into a Spring Boot application to handle AI-driven conversations over WhatsApp, using a local installation of...
View ArticleJava Weekly, Issue 554
1. Spring and Java >> Spring Boot 3.3 Boosts Performance, Security, and Observability [infoq.com] It is always cool to see just how much Boot is improving from version to version. Lots of...
View ArticleGuide to Choosing Between Protocol Buffers and JSON
1. Overview Protocol Buffers (Protobuf) and JSON are popular data serialization formats but differ significantly in readability, performance, efficiency, and size. In this tutorial, we’ll compare these...
View ArticleHow to Convert to and From a Stream and Two Dimensional Array in Java
1. Overview Working with arrays and streams is a common task in Java, particularly when dealing with complex data structures. While 1D arrays and streams are straightforward, converting between 2D...
View ArticleHow to Read Text Inside Mail Body
1. Introduction In this tutorial, we’ll explore how to read text inside the body of an email using Java. We’ll use the JavaMail API to connect to an email server, retrieve emails, and read the text...
View ArticleDifference Between null and Empty Array in Java
1. Overview In this tutorial, we’ll explore the difference between null and empty arrays in Java. While they might sound similar, null and empty arrays have distinct behaviors and uses crucial for...
View Article