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

Image may be NSFW.
Clik here to view.

The Difference Between mockito-core and mockito-all

1. Overview Mockito is a popular mocking framework for Java. But, before we start, we have some different artifacts to choose from. In this quick tutorial, we'll explore the difference between...

View Article


Image may be NSFW.
Clik here to view.

Guide to AtomicStampedReference in Java

1. Overview In this tutorial, we'll review details of theĀ AtomicStampedReference class from the java.util.concurrent.atomic package. After that, we'll explore the AtomicStampedReference classesĀ atomic...

View Article


Image may be NSFW.
Clik here to view.

Mocking the ObjectMapper readValue() Method

1. Overview When unit testing code that involves deserializing JSON with Jackson, we might find it easier to mock the ObjectMapper#readValueĀ method. By doing so, we don't need to specify long JSON...

View Article

Image may be NSFW.
Clik here to view.

Encode a String to UTF-8 in Java

1. Overview When dealing with Strings in Java, sometimes we need to encode them into a specific charset. This tutorial is a practical guide showing different ways to encode a String to the UTF-8...

View Article

Image may be NSFW.
Clik here to view.

Introduction to Transactions

1. Introduction In this tutorial, we'll understand the concept of transactions. We'll go through the types of transactions and different guarantees they provide. We'll also explore different protocols...

View Article


Image may be NSFW.
Clik here to view.

Spring Security: Check If a User Has a Role in Java

1. Introduction In Spring Security, sometimes it is necessary to check if an authenticated user has a specific role. This can be useful to enable or disable particular features in our applications. In...

View Article

Image may be NSFW.
Clik here to view.

Creating Spring Beans Through Factory Methods

1. Introduction Factory methods can be a useful technique for hiding complex creation logic within a single method call. While we commonly create beans in Spring using constructor or field injection,...

View Article

Image may be NSFW.
Clik here to view.

Building a Simple Web Application with Spring Boot and Groovy

1. Overview Groovy has a number of capabilities we might want to use in our Spring web applications. So, in this tutorial, we'll build a simple todo application with Spring Boot and Groovy. Also, we'll...

View Article


Image may be NSFW.
Clik here to view.

An Introduction to Kaniko

1. Introduction In this tutorial, we'll take a look at building container images using Kaniko. 2. Kaniko Kaniko is a tool to build container images from a Dockerfile. Unlike Docker, Kaniko doesn't...

View Article


Image may be NSFW.
Clik here to view.

Spring Security Custom Logout Handler

1. Overview The Spring Security framework provides very flexible and powerful support for authentication. Together with user identification, we'll typically want to handle user logout events and, in...

View Article

Image may be NSFW.
Clik here to view.

Java-R Integration

1. Overview R is a popular programming language used for statistics. Since it has a wide variety of functions and packages available, it's not an uncommon requirement to embed R code into other...

View Article

Image may be NSFW.
Clik here to view.

Constructing a JPA Query Between Unrelated Entities

1. Overview In this tutorial, we'll see how we can construct a JPA query between unrelated entities. 2. Maven Dependencies Let's start by adding the necessary dependencies to our pom.xml. First of all,...

View Article

Image may be NSFW.
Clik here to view.

Invoking a SOAP Web Service in Java

1. Overview In this tutorial, we'll learn how to build a SOAP client in Java with JAX-WS RI. First, we'll generate the client code using the wsimport utility, and then test it using a JUnit. For those...

View Article


Image may be NSFW.
Clik here to view.

Using Multiple Cache Managers in Spring

1. Overview In this tutorial, we'll learn how we can configure multiple cache managersĀ in a Spring application. 2. Caching Spring applies caching to methods so that our application doesn't execute the...

View Article

Image may be NSFW.
Clik here to view.

Invoking a SOAP Web Service in Spring

1. Overview Previously, we saw how to create a SOAP web service with Spring. In this tutorial, we'll learn how to create a Spring-based client to consume this web service. In invoking a SOAP web...

View Article


Image may be NSFW.
Clik here to view.

Java Weekly, Issue 331

1. Spring and Java >> Spring Tips: Configuration [spring.io] Handy tips from the experts on getting the most out of Spring's Environment abstraction through application.properties. >> An...

View Article

Image may be NSFW.
Clik here to view.

Mapping Lists with ModelMapper

1. Overview In this tutorial, we'll explain how to map lists of different element types using the ModelMapper framework. This involves using generic types in Java as a solution to convert different...

View Article


Image may be NSFW.
Clik here to view.

Memcached vs Redis

1. Overview In this article, we'll examine the similarities and differences of two popular in-memory databases, Memcached and Redis. 2. Memcached and Redis Often, we think about caching to improve...

View Article

Image may be NSFW.
Clik here to view.

Best Practices When Using Terraform

1. Overview Previously, we've covered Terraform's basic concepts and usage. Now, let's dig deeper and cover some of the best practices when using this popular DevOps tool. 2. Resource Files...

View Article

Image may be NSFW.
Clik here to view.

Disable Security for a Profile in Spring Boot

1. Overview In this tutorial, we're going to take a look at how we can disable Spring Security for a given profile. 2. Configuration First of all, let's define a security configuration that simply...

View Article
Browsing all 4535 articles
Browse latest View live


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