JWTs allow us to implement stateless authentication. We don’t have to query a central database to validate the token. But how do we invalidate them?
To make the most out of Pact, you should put some time into automation. This post will cover the steps you need to take to create a rock-solid workflow that helps you to reap the benefits of consumer driven contract testing.
Consumer driven contract testing is a method that can be used to verify that services speak the same language. It is an alternative to traditional integration testing that gives you faster feedback.
Microservices provide you with several benefits. But there’s no question that they introduce a new set of challenges, one of them being testing.
You’ve decided to build a wep app with React and want to use Spring Boot for the back end. This post will show you how to serve a React app from Spring Boot.
Often times in Java web applications we see that the package structure indicates that a layered architecture is used. In this post we’re going to explore the ideas around what would happen if layers were not the topmost level of organization in an application architecture.
Java 9 introduced three new methods to the Optional class. This post covers what they do and how to use them.
This post will cover how you can use OS environment variables to pass configuration values to a Spring Boot application.
Version control systems play a vital role in tracking the history of changes in a codebase. Knowing how to write good commit messages is an essential skill if you wish to have your project’s history well documented.
Arguably one of the most noteworthy new features introduced in Java 8 was the Streams API. Java 9 offers two new stream operations—takeWhile and dropWhile.
Nearly all Spring projects that I have worked with make heavy use of field injection. This must be a popular approach because it is concise and reads well. But have you ever considered the downsides of field injection?
A while loop is a control flow statement that runs a piece of code multiple times. It consists of a loop condition and body. Java also has a do while loop.
The ternary operator is a form of syntactic sugar for if-then-else statements. It is also known as the conditional operator, which is perhaps a more meaningful name because it evaluates conditions like if does.
The if statement is the most basic conditional statement. It checks a condition, which is any boolean expression, and runs a block of code if it is true.
Dependency inversion principle states that we should depend upon abstractions. Taking that into account, time should also be considered as a dependency.
Spring Boot provides a type-safe way to handle configuration by allowing you to create a bean and populating it with property values from your configuration file.
Externalized configuration is essential if you wish to deploy the same deployable unit to different environments without modifying the source code. Spring Boot provides several easy methods of doing that.
Dropwizard is a framework for building RESTful web services in Java. This tutorial shows how to create, retrieve, update, and delete resources.
Java 8 introduced the Streams API which allows developers to declaratively manipulate collections. Here are five ways to create a Stream in Java 8.
In addition to executing a Dropwizard application from the command line, you can increase your productivity by configuring your IDE to do that for you. This post is going to be looking at how to run a Dropwizard application in IntelliJ IDEA, Eclipse and NetBeans.
Dropwizard is a framework for building RESTful web services in Java. In this tutorial we’re going to have a look at how to get started with developing a Dropwizard application by building a new service from scratch.
Kata is an exercise where the novice repeatedly tries to emulate a master. In karate, these kata are a sequence of basic moves, strung together in a way that makes sense. PragDave proposes the idea of doing the same with programming.
Chrome is returning ERR_EMPTY_RESPONSE, Git and SSH connection hangs at expecting SSH2_MSG_KEX_ECDH_REPLY. Seems to be an MTU/fragmentation problem.
This post covers how the Java compiler handles Unicode escapes and how they can cause mysterious compiler errors.
In the spirit of the book Java Puzzlers by Joshua Bloch and Neal Gafter, this post discusses a Puzzler that can be found in Java 8 Streams.
ESP8266 is a low-cost WiFi chip with a full TCP/IP stack and a microcontroller capability. Here is how I used it to control an RC car.
In the typical case, the observer is responsible of getting the updated state from the subject. This means that the observer has to hold a reference to the subject (also the subject holds a reference to the observer, meaning we have created a circular reference).
Observer pattern is a design pattern with an intent to define a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically.
My Ansible playbook stopped working when using Vagrant 1.8 or above. The problem seems to be with changes made in Vagrant.
Vagrant Ansible provisioner skips plays that are meant to be run on localhost. There’s a simple workaround for that.
CompletableFuture is an implementation of the Future interface but with a modern twist. It takes advantage of functional operations to promote asynchronous/event-driven programming model.
I’ve decided to use Ansible to manage SugarCRM environments and deployments. Here’s an overview of Ansible playbooks I’ve created.
Optionals in Java can help you to write a program without null checks. Chaining Optionals in a Stream enables to pick the first Optional which has a value and return it.
Using Arduino IDE’s serial monitor with SparkFun ESP8266 Thing does not work. In this post you’ll see how to use a serial terminal with the SparkFun ESP8266 Thing on Linux.
If you have had any experience with Java, then you most likely have seen the NullPointerException. Optional in Java 8 are a way to fight them.
Introduced in Java 7, the fork/join framework is used to divide a parallelizable task into smaller ones and afterwards combine the intermediate results to get the end result.
Looking for an easy hardware project? Controlling an RC car with an Arduino board is relatively simple. I’ll share my experience.
This post will give you ideas on how to do version control with SugarCRM and how to manage multiple environments and deployments.
A collector is a recipe for how to build a summary of the elements in a Stream. In this post you’ll see how to create a custom collector in Java 8.
I debugged a service which didn’t start when using the service utility but was working fine when calling the init script directly.
Method references let you reuse existing method definitions and pass them just like lambdas. They can be useful in making the code more readable.
It is possible to host your blog at Github and version control your blog posts with Git. Here’s how.
In computer programming, an anonymous function (also function literal or lambda abstraction) is a function definition that is not bound to an identifier.
Behavior parameterization is essentially taking a block of code and making it available without executing it. Here’s how to do it with Java.
If you’re going to dedicate the best years of your life to work, make sure you’re doing it for the right reasons.
In part 2 I promised to show an example use case on how to connect to a Windows Server over RDP via a reverse SSH tunnel.
You need to access your work computer or network from your home. Maybe a Raspberry Pi can help you.
Joda-Time is a Java library which provides a quality replacement for the Java date and time classes.
Downgrading Broadcom’s proprietary driver and making sure no updates are applied to it.
I was unable to connect to QlikView Access Point from a Linux machine. My browser presented me with a username/password prompt and after entering the correct credentials, it seemed like no authentication was made.
A client of mine was unable to export data from QlikView Access Point to Excel.
SSH is something we (developers, sysadmins) use daily to connect to remote servers. Here are a few tips to keep your SSH connection secure.
Creating a scheduled task in Windows Task Scheduler to run a batch file is relatively straight forward, or so I thought.
What to do when suddenly you’re unable to connecto to a Windows server with Remmina over RDP
Rdesktop is an open source client for Windows Remote Desktop Services, capable of natively speaking Remote Desktop Protocol (RDP) in order to present the user’s Windows desktop
How to debug the dreaded ‘Error listenerStart’ error message
A tutorial for getting your feet of the ground with Mockito
I faced a com.mysql.jdbc.exceptions.jdbc4.CommunicationsException and this is how I solved it.
Non-ASCII characters in file name get garbled when uploading a file with Apache Commons and Spring CommonsMultipartResolver.
This post describes how to create a VM which has a connection to the internet and also to other VMs in the virtual network.
The goal of this post is to install Redis on both of them and set up a master-slave replication configuration
Sometimes I want to have access to all of my classes in a Yii application externally.
In this post, as promised, we’re going to implement a queue of jobs with Resque and Redis
I am fairly new to PHP and Yii. Lately i struggled with a ‘cannot redeclare class’ error.
A background job is a task that is executed ‘behind the scenes’ and without user intervention.
In order to accept Estonian ID card, Tomcat needs to be configured to accept client side certificates.
This article explains how to create an SSL certificate, get it signed and configure Apache web server
Here we are going to have a look at how to set up SSL on Apache Tomcat 7.0.
Where to find the option in Weblogic console to enable SSL?
These are not necessarily related to the technical aspects of programming.
You’ve just installed phpmyadmin from your package manager. Here’s what you need to do in order to access it
XsltException caused by a seemingly missing stylesheet. Turns out JRebel was the culprit.
Recently, working on a Windows box, I had a problem where my ANT_HOME and ant -version result did not match.