OnlyJava is your source for Blog Aggregation in the Java industry

Fluent Assertions Reloaded

 Mark As Read    

If youre not using fluent assertions in your tests yet and just rely on basic JUnit assertions, you might be missing out on a simple but very effective tool to write high-quality test code. The article starts with a short recap about the virtues of fluent assertions and how they address the shortcomings of basic assertions. But while very much in f...

Programming BS: Checked Exceptions

 Mark As Read    

The Problem I have always hated being forced to catch an exception, largely because: Remember that code you wrote that brings the database backup, adds disk space or memory, grants the correct file privileges as root? Neither do I. If a real problem occurs that is beyond the control of your code, then by definition, you cannot change the outcome....

Springboot Video Tutorial: Implement User Sign-Up

 Mark As Read    

In the video below, we take a closer look at Spring boot and how to implement user sign-up with RESTful Web Services. Let's get started!

Spring Boot: Eureka Server, Service Registration and Discovery

 Mark As Read    

In the video below, we take a closer look at Spring Boot: Eureka Server, Service Registration, and Discovery. Let's get started!

SKP Algorithms and Data Structures #11: Longest Palindrome in a String

 Mark As Read    

My article series on algorithms and data structures in a sort of "programming language agnostic way." A few of the algorithms and data structures are in C, a few in C++, and others are in Core Java. There is an assorted collection for learning, revising, revisiting, quick refresh, and a quick glance for interviews. You may even include them directl...

Smart Dependency Injection With Spring: Overview (Part 1 of 3)

 Mark As Read    

Preface Spring Framework is a very powerful framework and provides first-class support for dependency injection (DI). It contains a lot of features or ways to implement DI. Therefore, I decided to share my experience with it in this series. This series contains three articles: Basic usage of DI (this article) DI with assignability DI with gene...

How To Validate HTTP Post Request Body - Restful Web Services With Spring Framework | Spring Boot

 Mark As Read    

In the video below, we take a closer look at how to validate the HTTP POST request body - RESTful Web Services with Spring framework | Spring Boot. Let's get started!

Spring Boot - How To Implement Spring Security for User Sign-in | Spring Security

 Mark As Read    

In the video below, we take a closer look at Spring boot - how to implement spring security for user sign-in. Let's get started!

Improving Backend Performance Part 1/3: Lazy Loading in Vaadin Apps

 Mark As Read    

If you have a table or data grid with, say, more than a few hundred rows in it, you should be using lazy loading. This is especially true in the case of Vaadin's Grid component which makes it very easy to show data from an array or collection of POJOs. In this article, I'll show you how easy it is to take advantage of Spring Boot data to easily imp...

SKP's Algorithms and Data Structures #10: Java Auto-Complete Using Trie (Word Search)

 Mark As Read    

My article series on algorithms and data structures in a sort of "programming language agnostic way." A few of the algorithms and data structures are in C, a few in C++, and others are in Core Java. There is an assorted collection for learning, revising, revisiting, quick refresh, and a quick glance for interviews. You may even include them directl...

The Power of JFrog Build Info (Build Metadata), Part I

 Mark As Read    

What Is the Concept Behind the Term Build-info? Let's start at the very beginning and clarify the basic principle behind the term build-info. The term "build-info" has been coined for many years by the company JFrog, among others. This is a particular type of repository. This repository stores the information that describes the context that led to ...

How to Map and Reduce Items From a List in Java

 Mark As Read    

Mapping items from a List means that each item from that List will be converted into another object. Reducing items from a List means that all items from that List will be combined into a single object, which doesnt necessarily have the same type as the original ones. Lets say we have a List of Orders and each order has a List of Products.

Faster Maven Builds in Docker

 Mark As Read    

Last week, I described different techniques to quicken your Maven builds. Today, I'd like to widen the scope and do the same for Maven builds inside Docker. Between each run, we change the source code by adding a single blank line; between each section, we remove all built images, including the intermediate ones that are the results of the multi-st...

Faster Maven Builds

 Mark As Read    

Builds require a few properties, chief among them reproducibility. I would consider speed to be low on the order of priorities. However, it's also one of the most limiting factors to your release cycle: if your build takes T, you cannot release faster than each T. Hence, you'll probably want to speed up your builds after you've reached a certain ma...

The Performance Impact of java.lang.System.getProperty()

 Mark As Read    

java.lang.System.getProperty() is a common API used by Java developers to read the System properties that are configured during application startup time. i.e. when you pass -DappName=buggyApp as your applications startup JVM argument, the value of the appName system property can be read by invoking the java.lang.System.getProperty(). Example: ...

Spring Boot - Implementing Pagination and Get Users Web Service Endpoint | RESTful Web Services

 Mark As Read    

In the video below, we take a closer look at Spring boot - Implementing pagination and get users web service endpoint | RESTful Web Services. Let's get started!

Stop Coding and Start Innovating

 Mark As Read    

If you are like the majority of Java developers then you will have wasted a lot of time writing the same connectivity code over and over again. I used to spend days developing, debugging, and optimizing such connectivity logic and even though frameworks like Spring provide abstractions, the repetitive nature of such work was unavoidable. TESTS In t...

Spring Cloud Gateway : Resource Server With Keycloak RBAC

 Mark As Read    

In this article, we will be exploring how we can integrate a resource server with an API gateway that is integrated with Keycloak and that enables role-based access control (RBAC). Introduction In my previous article Spring Cloud Gateway Keycloak OAuth2 OIDC Integration, I have shown how we can integrate Keycloak with Spring Cloud Gateway. Now in t...

How to Get All Employees Using Spring Boot Layered Architecture and JdbcTemplate

 Mark As Read    

In the video below, we take a closer look at how to get all employees using Spring Boot layered architecture and JdbcTemplate. Let's get started!

PDF/A at scale: analysis of a mass conversion

 Mark As Read    

We've been running our PDF/A conversion tools across some large Corpora. Here's what we've learned in the process.

I still love Groovy . . .

 Mark As Read    

I was joyfully coding in Groovy for several years. Back to Java two years ago, and have not been writing any production code in Groovy, still writing my own productive non-production utilities in...

GroovyBlogs.org 930 days ago

Introduction To Pragmatic Functional Java

 Mark As Read    

The Pragmatic Functional Java (PFJ) is an attempt to define a new idiomatic Java coding style. Coding style, which will completely utilize all features of current and upcoming Java versions and involve compiler to help writing concise yet reliable and readable code. While this style can be used even with Java 8, with Java 11 it looks much cleaner a...

Weblogic 11g Installation on Mac OS: Issues and Fixes

 Mark As Read    

Environment Mac OS X (11.5.2) Weblogic 11g (10.3.6) JDK 8 (8u301) While installing Weblogic 11g on Mac OSX, you may face an Insufficient Disk Space issue, causing the installer to stop. No worries, here is a simple solution to address that. Just launch the installer from the console with the following parameters:

Spring Boot How To Change Default Context Path Using Java Command

 Mark As Read    

In the video below, we take a closer look at Spring Boot on how to change the default context path using the Java command. Let's get started!

Whats New Between Java 11 and Java 17?

 Mark As Read    

The 14th of September Java 17 was released. Time to take a closer look at the changes since the last LTS release, which is Java 11. A short introduction is given about the licensing model and after that, some of the changes between Java 11 and Java 17 are highlighted, mainly by means of examples. Enjoy! 1. Introduction First, lets take a close look...

Test Automation: Maven Profiles and Parallelization in Azure Pipelines Using IaaS

 Mark As Read    

When it comes to Test Automation, configuring parallel threads can become challenging especially when logins are involved. It's more of a challenge for the UI/ Selenium test to run batches in a separate thread on Azure pipelines with separate credential sets. Solution Overview: Create test suites using tags for the cucumber framework. Create profi...

How to Mock a Web Server in Your Java Applications

 Mark As Read    

When you need to test an application that consumes a web API, you basically have two options: Use Testcontainers to start a container that will run the web API which your application will consume. Mock a Web Server to emulate the web API which your application will consume. Many times, starting a container for that is not an option. For instanc...

Spring Boot Log4J2 Setup

 Mark As Read    

Log4J2 is an upgrade to the popular Log4J logging framework. It is one of the newer frameworks and its goal is to provide improvements on Logback as well as Log4J. Also, it aims to avoid some of the issues in its older version. In this post, we will look at Spring Boot Log4J2 setup. In case you are new to Spring Boot and would like to know more, pl...

Set Response Status Code - RESTful Web Services With Spring Framework | Spring Boot

 Mark As Read    

In the video below, we take a closer look at Set Response Status Code in RESTful Web Services with Spring framework | Spring Boot. Let's get started!

Integrating Commerce and Marketing Systems Using Expressway

 Mark As Read    

Expressway comes with a set of extensions to be added on the System Applications and Products (SAP) Commerce side to enable this point-to-point Integration between Commerce and Marketing systems. Expressway gets deployed with SAP Commerce application. People skilled in SAP Commerce can easily work on Expressway based Integration. It is important to...

Spring Boot MapStruct Example of Mapping JPA and Hibernate Entity to DTO | Spring Boot Tutorial

 Mark As Read    

In the video below, we take a closer look at Spring Boot MapStruct Example of Mapping JPA and Hibernate Entity to DTO | Spring Boot Tutorial. Let's get started!

How to Update an Employee Using Spring Boot Layered Architecture and JdbcTemplate [Video]

 Mark As Read    

In the video below, we take a closer look at how to update an employee using Spring Boot layered architecture and JdbcTemplate. Let's get started!

Multiple Ways to Configure Spring

 Mark As Read    

Two weeks ago, I wrote how you could write a Spring application with no annotations. Many alternatives are available to configure your Spring app. I'd like to list them in this post, leaving Spring Boot out of the picture on purpose. Core Concepts A couple of concepts are central in Spring. The related documentation doesn't describe most of them. H...

BFO PDF Library 2.26.1 release announcement

 Mark As Read    

Coming two months after one of our major releases, the 2.26.1 release has seen a large number of small changes based on testing on tens of thousands of documents. But we think the one you're going to notice is the improvements to logging. Read on for more detail.

HashMap: Things You Should Know How To Do

 Mark As Read    

What Is HashMap and How To Use It In the Java programming language, HashMap is widely used to store data in a key-value manner to establish an association between key-value pairs. It is used to map keys with specified values. HashMap < K, V > mapObject = new HashMap ();

Spring Boot + Swagger 3 (OpenAPI 3) + Security Example(Basic Authentication)

 Mark As Read    

In a previous tutorial, we implemented Spring Boot + Swagger 3 (OpenAPI 3) Hello World Example. Also previously, we had implemented Understand Spring Security Architecture and implement Spring Boot Security Example. In this tutorial, we will be implementing Spring Boot Basic Security for the Spring Boot Swagger example. So when using Swagger to ac...

Video Tutorial: Java Hash and Maps

 Mark As Read    

In the video below, we take a closer look at Map, HashMap, LinkedHashMap, TreeMap, and HashTable in Java with sample programs in Java Collections. Let's get started!

Pattern Matching for Switch in Java (JDK 17)

 Mark As Read    

If all you have is a hammer, everything looks like a nail. This sentence summarizes pretty much how I felt about the idiomatic polymorphism approach to most problems in Java until recently. Polymorphism is just a tool, and as for any tool, it excels at some tasks and performs poorly at others.

Spring @Transactional Mistakes Everyone Makes

 Mark As Read    

Probably one of the most used Spring annotations is @Transactional. Despite its popularity, it is sometimes misused, resulting in something that is not what the software engineer intended. In this article, I have collected the problems that I have personally encountered in projects. I hope this list will help you better understand transactions and ...

Porting From Nashorn: How To Handle JS Multi-Threading on Graalvm

 Mark As Read    

Porting existing JavaScript code from Nashorn to GraalVM can be a challenge. This article focus on a multi-threading issue we got into when we ported SwiftMQ Stream scripts generated from Flow Director. Javascript Is Single-Threaded If you register an asynchronous callback on a Java class and this callback is invoked while you are still within the ...

11 Best Production Debugging Tips and Techniques To Speed up Bug Fixes

 Mark As Read    

We understand Java Remote Debugging in Production is always a hectic process and it will take much time to get the issues fixed and stabilized. So, if youre assigned to the maintenance team to work on fixing bugs in the production environment, we have compiled the 11 best Production Debugging Tips And techniques that will help you find issues and f...

Set, HashSet, LinkedHashSet, and TreeSet in Java with Sample Programs | Java Collections

 Mark As Read    

In the video below, we take a closer look at Set, HashSet, LinkedHashSet, and TreeSet in Java with Sample Programs | Java Collections. Let's get started!

Java: How to Keep the Elements of a Map in the Order of Insertion

 Mark As Read    

Usually, Java developers instantiate Maps using HashMap as implementation. Did you know HashMap doesnt keep the order of insertion? Look at the following example:

Using Webswing to simplify PDF Viewer deployment

 Mark As Read    

The advantages of using Webswing to run PDF Viewer via a standard web browser

Announcing Angular CRUD 2.0

 Mark As Read    

Friends shouldn't let friends write CRUD apps. At least, not by hand. That's why I used a schematic called Angular CRUD in one of my last Angular + Spring Boot blog posts. That post is kinda old (January 2020), but the combination of Angular and Spring Boot remains popular. That's why I decided to turn the series into an Angular Mini-Book for Info...

Raible Designs 938 days ago

Protect Your Code From Bugs: An Overview of Five Static Analyzers for Java Code

 Mark As Read    

More About Static Analysis As the IT sphere is actively developing, the amount of written and maintained code grows with an incredible speed. The good old code review is an indispensable assistant that remains popular up to this day. However, the amount of code that reviewers have to look through and think over is horrifying. It takes a great dea...

Get Ready for Jakarta EE 10!

 Mark As Read    

Jakarta EE 10 is on its way! This is the third release of Jakarta EE since the transition from the Java Community Process (JCP) to Eclipse Foundation. In this session, we will go through every aspect of Jakarta EE 10 and how this release lowers the barriers of entry, eases the migration, and lays the foundation for a platform for future innovation....

Spring Boot: How to Configure Cache

 Mark As Read    

In this video tutorial, we take a closer look at how to configure cache in Spring Boot applications. Let's get started!

Choosing Library To Build Rest API in Java

 Mark As Read    

API is not a new concept in software engineering. In fact, SOAP was invented in 1998 which was very popular back then, it is still used today in large enterprise software. Representational State Transfer (REST) was proposed by Roy Fielding in 2000. Which became very popular due to its simplicity and in the last decade the adoption of RESTful API wa...

Spring Boot Actuator: Production-Ready Features

 Mark As Read    

In the video below, we take a closer look at Spring Boot Actuator: Production-ready features. Let's get started!

Java
Welcome!
OnlyJava aggregates blogs for the Java industry.
Custom Feeds
Add any RSS feed to the information you read daily.
Blocked Feeds
Block feeds to remove blogs you’re not interested in.
Account Settings
Customize the site by adding or removing feeds.

About Us

OnlyJava is your source for all your Java news.

Have a Suggestion for Us?
Know of a Java blog that we're missing? Let us know!

Share OnlyJava.com