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

Image may be NSFW.
Clik here to view.

Get the Running Port in Spring Boot

1. Overview A Spring Boot application embeds a web server, and sometimes, we may want to discover the HTTP port at runtime. In this tutorial, we'll address how to get the HTTP port programmatically in...

View Article


Image may be NSFW.
Clik here to view.

Conditionally Run or Ignore Tests in JUnit 4

1. Overview Let's imagine we have a test for some code that depends on the Operating System and should run only if our test machine is running on Linux. If it's running on any other OS, we want the...

View Article


Image may be NSFW.
Clik here to view.

@BeforeAll and @AfterAll in Non-Static Methods

1. Overview In this short tutorial, we're going to implement non-static methods with @BeforeAll and @AfterAll annotations available in Junit5. 2. @BeforeAll and @AfterAll in Non-Static Methods While...

View Article

Image may be NSFW.
Clik here to view.

Get a List of Trusted Certificates in Java

1. Overview In this quick tutorial, we'll learn how to read a list of trusted certificates in Java through quick and practical examples. 2. Loading the KeyStore Java stores the trusted certificates in...

View Article

Image may be NSFW.
Clik here to view.

Reading an HTTP Response Body as a String in Java

1. Introduction In this tutorial, we'll explore several libraries for reading an HTTP response body as a string in Java. Since the first versions, Java provided the HttpURLConnection API. This includes...

View Article


Image may be NSFW.
Clik here to view.

How To Get Cookies From the Apache HttpClient Response

1. Overview In this short tutorial, we'll see how to get cookies from the Apache HttpClient response.  First, we'll show how to send a custom cookie with an HttpClient request. Then, we'll see how to...

View Article

Image may be NSFW.
Clik here to view.

Getting Started with jOOQ

1. Introduction In this tutorial, we're going to take a quick tour of running an application with jOOQ (Java Object Orientated Query). This library generates Java classes based on the database tables...

View Article

Image may be NSFW.
Clik here to view.

Java Weekly, Issue 353

1. Spring and Java >> JEP 390: Warnings for Value-Based Classes [openjdk.java.net] One step closer to inline classes and Project Valhalla: Issue a warning when someone misuses a possible inline...

View Article


Image may be NSFW.
Clik here to view.

Using libphonenumber to Validate Phone Numbers

1. Overview In this quick tutorial, we'll see how to use Google's open-source library libphonenumber to validate phone numbers in Java. 2. Maven Dependency First, we'll need to add the dependency for...

View Article


Image may be NSFW.
Clik here to view.

Using JNA to Access Native Dynamic Libraries

1. Overview In this tutorial, we'll see how to use the Java Native Access library (JNA for short) to access native libraries without writing any JNI (Java Native Interface) code. 2. Why JNA? For many...

View Article

Image may be NSFW.
Clik here to view.

Checking if a Java Class is ‘abstract’ Using Reflection

1. Overview In this quick tutorial, we'll discuss how we can check if a class is abstract or not in Java by using the Reflection API. 2. Example Class To demonstrate this, we'll create an...

View Article

Image may be NSFW.
Clik here to view.

Differences Between Netflix Feign and OpenFeign

1. Overview In this tutorial, we're going to describe the differences between Spring Cloud Netflix Feign and Spring Cloud OpenFeign. 2. Feign Feign makes writing web service clients easier by providing...

View Article

Image may be NSFW.
Clik here to view.

Performing Calculations in the Database vs. the Application

1. Overview Often, we find it difficult to decide whether a calculation should be performed in the database (RDBMS) or application code to get good performance along with convenience at the same time....

View Article


Image may be NSFW.
Clik here to view.

Background Jobs in Spring with JobRunr

1. Overview In this tutorial, we're going to look into distributed background job scheduling and processing in Java using JobRunr and have it integrate with Spring. 2. About JobRunr JobRunr is a...

View Article

Image may be NSFW.
Clik here to view.

How to Stop Execution After a Certain Time in Java

1. Overview In this article, we'll learn how we can end a long-running execution after a certain time. We'll explore the various solutions to this problem. Also, we'll cover some of their pitfalls. 2....

View Article


Image may be NSFW.
Clik here to view.

Where Does H2’s Embedded Database Store The Data?

1. Introduction In this article, we'll learn how to configure the Spring Boot application to use the embedded H2 database and then see where H2's embedded database stores the data. H2 database is a...

View Article

Image may be NSFW.
Clik here to view.

Java Weekly, Issue 354

1. Spring and Java >> Shenandoah in JDK 11 – Interview With Red Hat's Team [infoq.com] Deep insights from Kennke and Shipilev about Shenandoah's history, the interaction with other JVM parts and...

View Article


Image may be NSFW.
Clik here to view.

Difference Between @ComponentScan and @EnableAutoConfiguration in Spring Boot

1. Introduction In this quick tutorial, we'll learn about the differences between @ComponentScan and @EnableAutoConfiguration annotations in the Spring Framework. 2. Spring Annotations Annotations make...

View Article

Image may be NSFW.
Clik here to view.

Creational Design Patterns in Core Java

1. Introduction Design Patterns are common patterns that we use when writing our software. They represent established best practices developed over time. These can then help us to ensure that our code...

View Article

Image may be NSFW.
Clik here to view.

Java Weekly, Issue 355

1. Spring and Java >> Project Panama and jextract [inside.java] Explore the secure, efficient, and modern native interaction APIs from Project Panama: foreign-Memory Access API and Foreign Linker...

View Article
Browsing all 4535 articles
Browse latest View live


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