Quantcast
Channel: Baeldung
Browsing all 4633 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

Best 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 Article


Image may be NSFW.
Clik here to view.

Removing 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 Article


Image may be NSFW.
Clik here to view.

Java 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 Article

Image may be NSFW.
Clik here to view.

Number Formatting in Java

1. Overview In this tutorial, we’ll learn about the different approaches to number formatting in Java, and how to implement them. 2. Basic Number Formatting With String#format The String#format method...

View Article

Image may be NSFW.
Clik here to view.

Build 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 Article


Image may be NSFW.
Clik here to view.

Java 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 Article

Image may be NSFW.
Clik here to view.

Guide 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 Article

Image may be NSFW.
Clik here to view.

How 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 Article


Image may be NSFW.
Clik here to view.

How 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 Article


Image may be NSFW.
Clik here to view.

Difference 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

Image may be NSFW.
Clik here to view.

Introduction to MyBatis-Plus

1. Introduction MyBatis is a popular open-source persistence framework that provides alternatives to JDBC and Hibernate. In this article, we’ll discuss an extension over MyBatis called MyBatis-Plus,...

View Article

Image may be NSFW.
Clik here to view.

Calculate the Sum of Diagonal Values in a 2d Java Array

1. Overview Working with two-dimensional arrays (2D arrays) is common in Java, especially for tasks that involve matrix operations. One such task is calculating the sum of the diagonal values in a 2D...

View Article

Image may be NSFW.
Clik here to view.

Create a ChatGPT Like Chatbot With Ollama and Spring AI

1. Introduction In this tutorial, we’ll build a simple help desk Agent API using Spring AI and the llama3 Ollama. 2. What Are Spring AI and Ollama? Spring AI is the most recent module added to the...

View Article


Image may be NSFW.
Clik here to view.

Avoiding “no runnable methods” Error in JUnit

1. Overview JUnit is the primary choice for unit testing in Java. During the test execution, developers often face a strange error that says there are no runnable methods even when we’ve imported the...

View Article

Image may be NSFW.
Clik here to view.

How to convert List to Flux in Project Reactor

1. Overview In Reactive Programming, it’s often necessary to transform Collections into a reactive stream known as a Flux. This becomes a crucial step when integrating an existing data structure into...

View Article


Image may be NSFW.
Clik here to view.

Introduction to Armeria

1. Introduction In this article, we’ll look at Armeria – a flexible framework for efficiently building microservices. We’ll see what it is, what we can do with it, and how to use it. At its simplest,...

View Article

Image may be NSFW.
Clik here to view.

How to Fill an Array With Random Numbers

1. Overview Generating random numbers is a common programming task primarily used in simulation, testing, and games. In this tutorial, we’ll cover multiple ways of filling the content of an array with...

View Article


Image may be NSFW.
Clik here to view.

Automated End-to-End Testing With Playwright

1. Overview End-to-end testing is one of the important factors in determining the overall working of the software product. It helps uncover the issues that may have gone unnoticed in the unit and...

View Article

Image may be NSFW.
Clik here to view.

Collect Successive Pairs From a Stream in Java

1. Overview In Java Streams, processing and transforming data efficiently is crucial for effective programming. Two powerful techniques for handling successive elements are using SimpleEntry for...

View Article

Image may be NSFW.
Clik here to view.

Print an Array Without Brackets and Commas

1. Introduction When printing an Array, the default print format will print the values in brackets, with commas separating each element. In this tutorial, we’ll learn how to print an Array without...

View Article
Browsing all 4633 articles
Browse latest View live