A Guide to Auto-Commit in JDBC
1. Introduction Database connections created with the JDBC API have a feature called auto-commit mode. Turning this mode on can help eliminate boilerplate code needed for managing transactions. In...
View ArticleHow to Set JSON Content Type In Spring MVC
1. Introduction The content type indicates how to interpret the data present in the request/response. Whenever a controller receives a web request, it consumes or produces some media types. In this...
View ArticleDiagnosing a Running JVM
1. Overview The Java Virtual Machine (JVM) is a virtual machine that enables a computer to run Java programs. In this article, we'll see how we can diagnose a running JVM with ease. We have many tools...
View ArticleJava Weekly, Issue 397
1. Spring and Java >> Interview with Brian Goetz on Java Language [inside.java] A controversial take on Project Loom and its impact on the reactive model, but also an interesting discussion on...
View ArticleBitmasking in Java with Bitwise Operators
1. Overview In this tutorial, we'll look at how to implement low-level bitmasking using bitwise operators. We'll see how we can treat a single int variable as a container for a separate piece of data....
View ArticleJava Annotation Attribute Value Restrictions
1. Overview These days, it's hard to imagine Java without annotations, a powerful tool in the Java language. Java provides a set of built-in annotations. Additionally, there are plenty of annotations...
View ArticleDisable the Maven Javadoc Plugin
1. Overview The Apache Maven Javadoc plugin allows us to generate Javadocs for the specified project during the Maven build. Furthermore, the plugin is pretty convenient since it generates the Javadocs...
View ArticleAn Intro to Dapr with Spring Cloud Gateway
1. Overview In this article, we'll start with a Spring Cloud Gateway application and a Spring Boot application. Then, we'll update it to use Dapr (Distributed Application Runtime) instead. Finally,...
View ArticleLooking for a Java Developer with Spring Experience (Remote) (Part Time)
Description We're looking for a Java developer with extensive Spring experience. On the non-technical side – a good level of command over the English language is also important. You're going to be...
View ArticleChoosing a GC Algorithm in Java
1. Introduction The JVM ships with various options for garbage collection to support a variety of deployment options. With this, we get flexibility in choosing which garbage collector to use for our...
View ArticleHosting a Maven Repository on GitHub
1. Overview In this tutorial, we'll understand how to host a Maven repository on GitHub with sources using the site-maven plugin. This is an affordable alternative to using a repository like Nexus. 2....
View ArticleThrowing Exceptions in Constructors
1. Overview Exceptions provide separation of error handling code from the normal flow of the application. It's not uncommon to throw an exception during the instantiation of an object. In this article,...
View ArticleJava Weekly, Issue 398
1. Spring and Java >> What's New in Java 16 [infoq.com] An overview of new features in Java 16: records, pattern matching for instanceof, sealed classes, and more! >> JEP 416: Reimplement...
View ArticleInserting Delays Between Requests in Apache JMeter
1. Overview When we're testing with Apache JMeter, we may wish to add a delay between the requests to make a better model of our user behavior. In this tutorial, we’ll create a simple test plan. We'll...
View ArticleValidate String as Filename in Java
1. Overview In this tutorial, we'll discuss different ways to validate if a given String has a valid filename for the OS, using Java. We want to check the value against restricted characters or length...
View ArticleSpring @EnableWebSecurity vs. @EnableGlobalMethodSecurity
1. Overview We may wish to apply multiple security filters within the different paths of our Spring Boot applications. In this tutorial, we'll take a look at two approaches to customizing our security...
View ArticleSpring Data with ArangoDB
1. Introduction In this tutorial, we'll learn how to work with the Spring Data module and ArangoDB database. ArangoDB is a free and open-source multi-model database system. It supports key-value,...
View ArticleIntroduction to ksqlDB
1. Introduction ksqlDB can be described as a real-time event-streaming database built on top of Apache Kafka and Kafka Streams. It combines powerful stream processing with a relational database model...
View ArticleCompare the Content of Two Files in Java
1. Overview In this tutorial, we'll review different approaches to determine if the contents of two files are equal. We'll be using core Java Stream I/O libraries to read the contents of the files and...
View ArticleJava Weekly, Issue 399
1. Spring and Java >> What are they building—and why? 6 questions for the top Java architects [blogs.oracle.com] The Java architects talking about its vibrance, prioritizing language features,...
View Article