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

Image may be NSFW.
Clik here to view.

A Quick Guide to Working with Web Services in Groovy

1. Overview Nowadays, we see a range of ways to expose data by an application over the web. Often, the application uses a SOAP or REST web service to expose their APIs. However, there are streaming...

View Article


Image may be NSFW.
Clik here to view.

Logging Spring WebClient Calls

1. Overview In this tutorial, we are going to show how to customize Spring's WebClient – a reactive HTTP client – to log requests and responses. 2. WebClient WebClient is a reactive and non-blocking...

View Article


Image may be NSFW.
Clik here to view.

A Guide to the Java FileReader Class

1. Overview As the name suggests, FileReader is a Java class that makes it easy to read the contents of a file. In this tutorial, we'll learn the basic concept of a Reader and how we can use the...

View Article

Image may be NSFW.
Clik here to view.

Listing Numbers Within a Range in Java

1. Overview In this tutorial, we'll explore different ways of listing sequences of numbers within a range. 2. Listing Numbers in a Range 2.1. Traditional for Loop We can use a traditional for loop to...

View Article

Image may be NSFW.
Clik here to view.

Generating Random Numbers in a Range in Java

1. Overview In this tutorial, we'll explore different ways of generating random numbers within a range. 2. Generating Random Numbers in a Range 2.1. Math.random The Math.random gives a random double...

View Article


Image may be NSFW.
Clik here to view.

Java Copy Constructor

1. Introduction A copy constructor in a Java class is a constructor that creates an object using another object of the same Java class. It's helpful when we want to copy a complex object that has...

View Article

Image may be NSFW.
Clik here to view.

Finding the Difference Between Two Strings in Java

1. Overview This quick tutorial will show how to find the difference between two strings using Java. For this tutorial, we're going to use two existing Java libraries and compare their approaches to...

View Article

Image may be NSFW.
Clik here to view.

Could Not Find or Load Main Class Error

1. Introduction Occasionally when we run a Java program, we might see “Could not find or load main class”. It's easy to guess the reason: The JVM failed to find the main class and gave this error. But...

View Article


Image may be NSFW.
Clik here to view.

Copy a File to Multiple Directories on Linux

1. Overview In this tutorial, we'll learn how to copy a file to multiple directories on Linux. The commands will work on any POSIX shell, including bash. 2. To A Single Directory We can use the cp...

View Article


Image may be NSFW.
Clik here to view.

Guide to System.gc()

1. Overview In this tutorial, we're going to investigate the System.gc() method located in the java.lang package. Explicitly calling System.gc() is known for being a bad practice. Let's try to...

View Article

Image may be NSFW.
Clik here to view.

Spring Data Reactive Repositories with Couchbase

1. Overview In this tutorial, we'll learn how to configure and implement database operations in a reactive way on Couchbase using Spring Data Repositories. We'll cover the basic usages of...

View Article

Image may be NSFW.
Clik here to view.

Linux Commands – Repeat a Command n Times

1. Introduction Repeating a command is one of the most commonly used operations when working with Linux scripting. In this quick tutorial, we'll present how to perform an operation n times using...

View Article

Image may be NSFW.
Clik here to view.

Debugging the Spring MVC 404 “No mapping found for HTTP request” Error

1. Introduction Spring MVC is a traditional application built using the Front Controller Pattern. DispatcherServlet, which acts as the front controller, is responsible for routing and request...

View Article


Image may be NSFW.
Clik here to view.

How to Compress Requests Using the Spring RestTemplate

1. Introduction In this short tutorial, we'll look at how to send HTTP requests containing compressed data. In addition, we'll look at how to configure a Spring web application so it handles compressed...

View Article

Image may be NSFW.
Clik here to view.

Custom Mapper with MapStruct

1. Overview In this article, we'll learn how to use custom mapper with the MapStruct library. The MapStruct library is used for mapping between Java bean types. By using a custom mapper with MapStruct,...

View Article


Image may be NSFW.
Clik here to view.

Permissions-Based Access Control with Apache Shiro

1. Introduction In this tutorial, we'll look at how to implement fine-grained Permissions-Based Access Control with the Apache Shiro Java security framework. 2. Setup We'll use the same setup as our...

View Article

Image may be NSFW.
Clik here to view.

Linux Commands – Looping Through Directories

1. Overview There are various occasions when we might want to loop through all the directories in a given folder. For example, we may want to iterate through all the directories and run a particular...

View Article


Image may be NSFW.
Clik here to view.

Execute a Command in Multiple Directories on Linux

1. Introduction In this tutorial, we'll explore a few Bash approaches to execute the same command in multiple directories. 2. A Closer Look First of all, let's break down the goal into smaller steps:...

View Article

Image may be NSFW.
Clik here to view.

Difference between vs

1. Overview In this tutorial, we're going to learn about the differences between two major XML configuration elements of Spring: <context:annotation-config> and <context:component-scan>. 2....

View Article

Image may be NSFW.
Clik here to view.

OCP Certification – Advanced Java Class Design

1. Overview In this tutorial, we'll discuss the advanced Java class design objective of the OCP certification. 2. OCP Java Certification The OCP certification is an upgrade on the OCA certification but...

View Article
Browsing all 4535 articles
Browse latest View live


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