Parsing Command-Line Parameters with JCommander 1. Overview In this tutorial, we’ll learn how to use JCommander to parse command-line parameters. We’ll explore several of its features as we build a simple command-line application. 2. Why JCommander? “Because life is too short to parse command line parameters” – Cédric Beust JCommander, created by Cédric… Continue Reading jcommander-parsing-command-line-parameters

Practical Application of Test Pyramid in Spring-based Microservice 1. Overview In this tutorial, we’ll understand the popular software-testing model called the test pyramid. We’ll see how it’s relevant in the world of microservices. In the process, we’ll develop a sample application and relevant tests to conform to this model. In… Continue Reading spring-test-pyramid-practical-example

Authentication with HttpUrlConnection 1. Overview In this tutorial, we’re going to explore how to authenticate HTTP requests using the HttpUrlConnection class. 2. HTTP Authentication In web applications, servers may require clients to authenticate themselves. Failing to comply usually results in the server returning an HTTP 401 (Unauthorized) status code. There… Continue Reading java-http-url-connection

Using Lombok’s @Accessors Annotation 1. Overview It’s pretty typical to have get and set methods in our domain objects, but there are other ways that we may find more expressive. In this tutorial, we’ll learn about Project Lombok‘s @Accessors annotation and its support for fluent, chained, and custom accessors. Before continuing,… Continue Reading lombok-accessors