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

Guide to FastUtil

1. Introduction In this tutorial, we’ll be looking at the FastUtil library. First, we’ll code some examples of its type-specific collections. Then, we’ll analyze the performance that gives FastUtil its...

View Article


Multi-Module Maven Application with Java Modules

1. Overview The Java Platform Module System (JPMS) adds more reliability, better separation of concerns, and stronger encapsulation to Java applications. However, it’s not a build tool, hence it lacks...

View Article


Batch Insert/Update with Hibernate/JPA

1. Overview In this tutorial, we’ll look at how we can batch insert or update entities using Hibernate/JPA. Batching allows us to send a group of SQL statements to the database in a single network...

View Article

Run JAR Application With Command Line Arguments

1. Overview Typically, every meaningful application includes one or more JAR files as dependencies. However, there are times a JAR file itself represents a standalone application or a web application....

View Article

RestTemplate Post Request with JSON

1. Introduction In this tutorial, we’ll illustrate how to use Spring’s RestTemplate to make POST requests sending JSON content. 2. Setting Up the Example Let’s start by adding a simple Person model...

View Article


Guide to Classgraph Library

1. Overview In this brief tutorial, we’ll talk about the Classgraph library — what it helps with and how we can use it. Classgraph helps us to find target resources in the Java classpath, builds...

View Article

Image may be NSFW.
Clik here to view.

Guide to QuarkusIO

1. Introduction Today, it’s very common to write an application and deploy to the cloud and not worry about the infrastructure. Serverless and FaaS have become very popular. In this type of...

View Article

Void Type in Java

1. Overview As Java developers, we might have encountered the Void type at some occasion and wondered what was its purpose. In this quick tutorial, we’ll learn about this peculiar class and see when...

View Article


Skipping Tests with Maven

1. Introduction Skipping tests is often a bad idea. However, there are some situations where it could be useful — maybe when we’re developing new code and want to run intermediate builds in which the...

View Article


Create a Java Command Line Program with Picocli

1. Introduction In this tutorial, we’ll approach the picocli library, which allows us to easily create command line programs in Java. We’ll first get started by creating a Hello World command. We’ll...

View Article

Defining JPA Entities

1. Introduction In this tutorial, we’ll learn about the basics of entities along with various annotations that define and customize an entity in JPA. 2. Entity Entities in JPA are nothing but POJOs...

View Article

Image may be NSFW.
Clik here to view.

JUnits Tagging and Filtering Tests

1. Overview It’s very common to execute all our JUnits automatically as a part of the CI build using Maven. This, however, is often time-consuming. Therefore, we often want to filter our tests and...

View Article

Mockito Strict Stubbing and The UnnecessaryStubbingException

1. Overview In this quick tutorial, we’ll learn about the Mockito UnnecessaryStubbingException. This exception is one of the common exceptions we’ll likely encounter when using stubs incorrectly. We’ll...

View Article


Get the Path of the /src/test/resources Directory in JUnit

1. Overview Sometimes during unit testing, we might need to read some file from the classpath or pass a file to an object under test. Or, we may have a file in src/test/resources with data for stubs...

View Article

Authenticating with Amazon Cognito Using Spring Security

1. Introduction In this tutorial, we will look at how we can use Spring Security‘s OAuth 2.0 support to authenticate with Amazon Cognito. Along the way, we’ll briefly take a look at what Amazon Cognito...

View Article


Image may be NSFW.
Clik here to view.

Java Localization – Formatting Messages

1. Introduction In this tutorial, we’ll consider how we can localize and format messages based on Locale. We’ll use both Java’s MessageFormat and the third-party library, ICU. 2. Localization Use Case...

View Article

Image may be NSFW.
Clik here to view.

Guide to JVM Platform Annotations in Kotlin

1. Introduction Kotlin provides several annotations to facilitate compatibility of Kotlin classes with Java. In this tutorial, we’ll specifically explore Kotlin’s JVM annotations, how we can use them...

View Article


Default Column Values in JPA

1. Introduction In this tutorial, we’ll look into default column values in JPA. We’ll learn how to set them in as a default property in the entity as well as directly in the SQL table definition. 2....

View Article

Java Weekly, Issue 280

Here we go… 1. Spring and Java >> Multiple Cache Configurations with Caffeine and Spring Boot [techblog.bozho.net] A novel extension of the CaffeineCacheManager lets you configure caches with...

View Article

JPA @Basic Annotation

1. Overview In this quick tutorial, we’ll explore the JPA @Basic annotation. We’ll also discuss the difference between @Basic and @Column JPA annotations. 2. Basic Types JPA support various Java data...

View Article
Browsing all 3566 articles
Browse latest View live


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