Java Weekly, Issue 576
1. Spring and Java >> Peaceful and Bright Future of Integrity by Default in Java [inside.java] The “Integrity by Default” JEP aims to restrict unsafe APIs by default (with the option to override...
View ArticleSetting Connection Timeout and Read Timeout for Jersey
1. Introduction In this tutorial, we’ll explore the importance of configuring connection/read timeouts in REST clients. We’ll demonstrate this using Jersey, a common JAX-RS implementation. 2. Why Set...
View ArticleJava Weekly, Issue 577
1. Spring and Java >> Does AI-Generated Documentation Have Value? [vanillajava.blog] Peter Lawrey analyzes the benefits of AI-generated documentation, and how to use it to gain insights for...
View ArticleUsing LangChain4j With Micronaut
1. Overview LangChain4j is a Java library based on LangChain. We use it in our Java applications to integrate with LLMs. Micronaut is a modern, JVM-based framework designed for building lightweight,...
View ArticleHow to Check For a Logged Message in a Spock Test
1. Introduction As our code executes we often log events of interest. Some of those events are important enough that we want to ensure that our message is logged. In this tutorial, we’ll learn how to...
View ArticleNull Array to Empty List in Java
1. Overview In Java programming, simplicity often hides behind the handling of null values, especially when dealing with arrays. Likewise, converting a potentially null array to an empty List isn’t...
View ArticleJava Weekly, Issue 578
1. Spring and Java >> Building Effective Agents with Spring AI (Part 1) [spring.io] Explore basic design patterns for implementing LLM-based systems, with practical examples using Spring AI....
View ArticleValidate List of Values in Spring
1. Overview The process of validating various values is critical in software development. It ensures that the data flowing into our application is correct and consistent. Validations can be applied to...
View ArticleConvert Camel Case to Snake Case in Java
1. Overview Camel and snake cases are two common naming conventions often used in programming. While the camel case utilizes capital letters to signify the start of a new word (camelCaseExample), the...
View ArticleIntroduction to JLine 3
1. Introduction JLine is a library for handing console input, giving us similar abilities to the GNU readline library or the ZSH line editor. In this tutorial, we’ll examine JLine 3, learning what it...
View ArticleConvert Mono Object to Another Mono Object in Spring WebFlux
1. Introduction Spring WebFlux is a reactive programming framework that facilitates asynchronous, non-blocking communication. A key aspect of working with WebFlux is handling Mono objects, representing...
View ArticleMock JWT with JwtDecoder in JUnit Test
1. Overview In this tutorial, we’ll explore how to effectively mock JWT (JSON Web Token) for unit testing Spring Security applications that use JWT authentication. Testing JWT-secured endpoints often...
View ArticleGenerate All Possible IP Addresses From Given Numeric String in Java
1. Overview In this tutorial, we’ll explore different ways to generate all possible IP Addresses from a given numeric string in Java. This problem is a common interview question. We’ll first deep-dive...
View ArticleRemove Insignificant Zeros From a Number Represented as a String
1. Introduction In this tutorial, we’ll learn how to remove insignificant zeros from a number represented in a String, including leading and trailing zeros. We’ll explore several ways to achieve this,...
View ArticleWhy super.super.method() is Not Allowed in Java
1. Overview In Java, inheritance is a powerful mechanism for reusing and extending functionalities across classes. By leveraging the super keyword, we can access the methods and properties of a parent...
View ArticleJUL to SLF4J Bridge
1. Introduction JUL is Java’s built-in logging framework. It’s simple to use but lacks the flexibility and advanced features offered by modern alternatives. For this reason, many applications choose...
View ArticleA Guide to One-Time Token Login in Spring Security
1. Overview Providing a smooth log-in experience for a website requires a delicate balance. On one hand, we want users with various levels of computer savviness to be able to go through the log-in as...
View ArticleKafka Producer and Consumer Message Acknowledgement Options
1. Introduction As we know, Apache Kafka is a messaging and streaming system. It provides acknowledgment options for ensuring reliability guarantees. In this tutorial, let’s learn about acknowledgment...
View ArticleFix the Exception “Cannot issue data manipulation statements with...
1. Introduction In this tutorial, we’ll explore fixing the exception: Cannot issue data manipulation statements with executeQuery(). It’s not common to encounter this problem when working with JDBC to...
View ArticleIntroduction to New Relic for Java
1. Overview New Relic’s Application Performance Monitoring (APM) helps us monitor and analyze the performance of our applications and microservices in one place. It removes the need for separate tools...
View Article