In this tutorial, we will build a simple Spring boot 2 application with access to a Postgres database using JPA. Background: Before we get started, let us get a couple of definitions out of the way. What is JPA? JPA stands for the “Java Persistence API”. It is a java specification that defines how data […]
In this article, we will create a new custom MBean. We will show how to configure this bean and then we will test it using Jolokia (JMX over HTTP). Prerequisites If you have not yet configured Jolokia, then we suggest that you go over this article https://nullbeans.com/how-to-configure-jolokia-on-a-spring-boot-server/ before you proceed. About MBeans Managed beans (MBeans) allow the […]
In this article, we will find out how to configure Jolokia on a Spring Boot 2 server. We will also configure Jolokia on a different management port and a different base URL. Background Jolokia is a JMX over HTTP bridge that allows system administrators to access their MBeans and JMX functionalities over HTTP and JSON. […]
Summary: In this post, we will explore how to use the Java comparable interface to automatically sort collections of any classes. We will use the Java Collections from the util library as an example. Introduction: Java interfaces are one of the most powerful features of the object oriented programming language. When a class implements […]
In this post we will discuss how to improve the performance of Java programs that utilize ArrayLists by setting the list’s initial capacity. ArrayLists and lists in general are great data structures for storing data. They are convenient for when we don’t know how large our data set. However, this comes with a performance […]
Introduction Freemarker is a powerful Java template engine. It can be used to generate basically anything, from HTML pages, configuration files, e-mails, or anything else. All you need to do is define your template, use Java to prepare the data, and use the Freemarker engine to process your data with the given template to produce […]
Probably one of the most common and annoying exceptions to be encountered by any Java developer is the dreaded “NullPointerException”. A null pointer exception is thrown when an “illegal” referencing of a null object is performed. A “null” object is an object which is not initialized. Let us explore some examples of how a null […]
In the following article, we will find out how to install Apache Maven on Windows. We will be using Windows 8.1 and Maven 3.5.4 in this guide, but the instructions should also be valid for other software versions. Before we start, make sure that you have JDK installed properly on your machine. Next, we will […]
To improve our website, we would like to ask for your help filling out a short survey.
We only need 5 minutes of your time to tell us your opinion about our website. We will not ask for your email address!
Thank you very much!
Survey link: here