Quantcast
Channel: Baeldung
Browsing all 3568 articles
Browse latest View live
ā†§

Guide to MapDB

1. Introduction In this article, weā€™ll look at the MapDB library ā€” an embedded database engine accessed through a collection-like API. We start by exploring the core classes DBĀ andĀ DBMakerĀ that help...

View Article


Image may be NSFW.
Clik here to view.

The Java SecureRandom Class

1. Introduction In this short tutorial, weā€™ll learn about java.security.SecureRandom, aĀ class that provides a cryptographically strong random number generator. 2. Comparison to java.util.Random...

View Article


Image may be NSFW.
Clik here to view.

JWS + JWK in a Spring Security OAuth2 Application

1. Overview In this tutorial, weā€™ll learn about JSON Web Signature (JWS), and how it can be implemented using the JSON Web Key (JWK) specification on applications configured with Spring Security...

View Article

Image may be NSFW.
Clik here to view.

Working with Enums in Thymeleaf

1. Introduction In this quick tutorial, weā€™re going to learn how to work with enumsĀ in Thymeleaf. Weā€™ll start by listing enum values in a dropdown. After that, weā€™ll look at using our enum for flow...

View Article

How to Reverse a String in Java

1. Overview In this tutorial, weā€™re going to see how we can reverse a String in Java. Weā€™ll start to do this processing using plain Java solutions. Next, weā€™ll have a look at the options that the...

View Article


Spring @Qualifier Annotation

1. Overview In this article, weā€™ll explore what the @Qualifier annotation can help us with, which problems it solves, and how to use it. Weā€™ll also explain how itā€™s different from the @Primary...

View Article

Programmatic Transaction Management in Spring

1. Overview Spring's @Transactional annotation provides a nice declarative API to mark transactional boundaries. Behind the scenes, an aspect takes care of creating and maintaining transactions as they...

View Article

Manipulating Strings in Linux with tr

1. Overview In this tutorial, we'll see how to manipulate strings using the tr in Linux. Note that we've tested these commands using Bash, but should work on any POSIX-compliant terminal. 2. Lower Case...

View Article


Guide to Stream Redirections in Linux

1. Introduction Whenever we work on the Linux command line, we often have to pass data from one command to another, like feeding a list ofĀ find results into aĀ grep.Ā This is where streams come into...

View Article


How to Count Duplicate Elements in Arraylist

1. Overview In this short tutorial, we'll look at some different ways to count the duplicated elements in an ArrayList. 2. Loop with Map.put() Our expected result would be a Map object, which contains...

View Article

Best Practices for REST API Error Handling

1. Introduction REST is a stateless architecture in which clients can access and manipulate resources on a server. Generally, REST services utilize HTTP to advertise a set of resources that they manage...

View Article

Intro to Spring Data Geode

1. Overview Apache Geode provides data management solutions through a distributed cloud architecture. It would be ideal to utilize the Spring Data APIs for the data access through the Apache Geode...

View Article

Concatenating Files in Linux

1. Introduction Sometimes, we need to do some operations that require using multiple files at the same time. This can be something as common as searching for some text in multiple files or merging...

View Article


File System Mocking with Jimfs

1. Overview Typically, when testing components that make heavy use of I/O operations, our tests can suffer from several issues such as poor performance, platform dependency, and unexpected state. In...

View Article

Testing a Spring Batch Job

1. Introduction Unlike other Spring-based applications, testing batch jobs comes with some specific challenges, mostly due to the asynchronous nature of how jobs are executed. In this tutorial, we're...

View Article


Image may be NSFW.
Clik here to view.

Mapping a Single Entity to Multiple Tables in JPA

1. Introduction JPA makes dealing with relational database models from our Java applications less painful. Things are simple when we map every table to a single entity class. But, sometimes we have...

View Article

Converting Java Date to OffsetDateTime

1. Introduction In this tutorial, we learn about the difference between DateĀ and OffsetDateTime. We also learn how to convert from one to the other. 2. Difference between Date and OffsetDateTime...

View Article


Java Scanner hasNext() vs. hasNextLine()

1. Overview The Scanner class is a handy tool that can parse primitive types and strings using regular expressions and was introduced into the java.util package in Java 5. In this short tutorial, we'll...

View Article

Customizing the Result of JPA Queries with Aggregation Functions

1. Overview While Spring Data JPA can abstract the creation of queries to retrieve entities from the database in specific situations, we sometimes need to customize our queries, such as when we add...

View Article

Guide to the Linux find Command

1. Introduction The Linux find command can be used to find files and directories on a disk. It provides several command-line options that make it a powerful tool. In this tutorial, we'll look at how to...

View Article
Browsing all 3568 articles
Browse latest View live


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