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

Image may be NSFW.
Clik here to view.

Java Enums, JPA and PostgreSQL Enums

1. Introduction In this tutorial, we’ll explore the concepts of Java enums, JPA, and PostgreSQL enums, and learn how to use them together to create a seamless mapping between Java enums and PostgreSQL...

View Article


Image may be NSFW.
Clik here to view.

Finding the Max Value in Spring Data JPA

1. Introduction When using Spring Data JPA, finding specific values in our database is a common task. One such task is finding the maximum value in a particular column. In this tutorial, we’ll explore...

View Article


Image may be NSFW.
Clik here to view.

How to Delay a Stubbed Method Response With Mockito

1. Introduction Mockito allows developers to stub methods to return specific values or perform certain actions. In some test scenarios, we may need to introduce a delay in the response of a stubbed...

View Article

Image may be NSFW.
Clik here to view.

HTTP Request and Response Logging Using Logbook in Spring

1. Overview HTTP API requests are part of most applications now. Logbook is an extensible Java library to enable complete request and response logging for different client and server-side technologies....

View Article

Image may be NSFW.
Clik here to view.

Vertical Slice Architecture

1. Overview In this tutorial, we’ll learn about Vertical Slice Architecture and how it attempts to solve the issues associated with layered designs. We’ll discuss structuring the code by business...

View Article


Image may be NSFW.
Clik here to view.

Store File or byte[] as SQL Blob in Java (Store and Load)

1. Overview Files such as images, audio, video, documents, etc. can be stored in a database as Binary Large Object (BLOB). A BLOB is a SQL data type that can store large binary data as a single entity....

View Article

Image may be NSFW.
Clik here to view.

Introduction to TigerBeetle Transactions Database

1. Introduction In this tutorial, we’ll explore the TigerBeetle database engine and learn how we can use it to build a fault-tolerant and high-performance application. 2. Financial Transactions in a...

View Article

Image may be NSFW.
Clik here to view.

Define Multiple Repositories With Maven

1. Overview Apache Maven lets us define a repository or a central place where we store and retrieve project artifacts. Sometimes, we need to define multiple repositories, especially when our project...

View Article


Image may be NSFW.
Clik here to view.

Check if a Variable Is Null Using Hamcrest

1. Overview When we write unit tests in Java, particularly with the JUnit framework, we often need to verify that certain variables are null or not null. Hamcrest, a popular library of Matchers for...

View Article


Image may be NSFW.
Clik here to view.

Difference Between hasItems(), contains(), and containsInAnyOrder() in Hamcrest

1. Introduction Hamcrest is a popular framework for writing matcher objects in Java, providing an expressive way to define match conditions. Matchers like hasItems(), contains(), and...

View Article

Image may be NSFW.
Clik here to view.

Arithmetic Operations on Arbitrary-Length Binary Integers in Java

1. Overview In digital signal processing, operations are often performed on the binary representations of signals. In computer graphics, bit manipulation is critical for color, pixel operations, and...

View Article

Image may be NSFW.
Clik here to view.

Guide to CompletableFuture join() vs get()

1. Introduction In Java’s concurrent programming, CompletableFuture is a powerful tool that allows us to write non-blocking code. When working with CompletableFuture, we’ll encounter two common...

View Article

Image may be NSFW.
Clik here to view.

Java Weekly, Issue 548

1. Spring and Java >> Getting Started with Jakarta Data and Hibernate [thorben-janssen.com] Jakarta Data, a new specification in Jakarta EE 11: a repository abstraction on top of Jakarta...

View Article


Image may be NSFW.
Clik here to view.

Read Last N Lines From File in Java

1. Introduction In this article, we’ll see how can we read the last N lines from a file using different standard Java packages and the Apache Commons IO library. 2. Sample Data We’ll use the sample...

View Article

Image may be NSFW.
Clik here to view.

How to Fix PSQLException: Operator Does Not Exist: Character Varying = UUID

1. Introduction In this tutorial, we’ll explore the PSQLException error: “operator does not exist: character varying = uuid” when using JPA to interact with PostgreSQL. We’ll delve into why this error...

View Article


Image may be NSFW.
Clik here to view.

Testing CORS in Spring Boot

1. Overview Cross-Origin Resource Sharing (CORS) is a security mechanism that allows a web page from one origin to access resources from another origin. It’s enforced by browsers to prevent websites...

View Article

Image may be NSFW.
Clik here to view.

Guide to FileWriter vs. BufferedWriter

1. Overview In this tutorial, we’ll look at the performance differences between two basic Java classes for writing files: FileWriter and BufferedWriter. While conventional wisdom on the web often...

View Article


Image may be NSFW.
Clik here to view.

Containerize a Spring Boot Application With Podman Desktop

1. Overview In this tutorial, we’ll learn how to containerize a Spring Boot application using Podman Desktop. Podman is a containerization tool that allows us to manage containers without requiring a...

View Article

Image may be NSFW.
Clik here to view.

Fixing UnsupportedTemporalTypeException: Unsupported Field: InstantSeconds

1. Overview When working with dates, we often leverage the Date-Time API. However, manipulating or accessing temporal data may lead to errors and exceptions when done improperly. One such specific...

View Article

Image may be NSFW.
Clik here to view.

A Guide to Structured Output in Spring AI

1. Introduction Typically, when using large language models (LLMs), we don’t expect a structured response. Moreover, we got used to their unpredictable behavior, which often leads to outputs that do...

View Article
Browsing all 3605 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>