The ability to easily change the log level of an application from INFO to DEBUG, or any other log level, is a feature frequently desired to have in any backend system. What if there is a way to configure the application to dynamically set its log level based on an input given by the consumer of the application. More specifically, this blog post will demonstrate how to tune Java’s Logback and Log4j libraries to let HTTP clients define what log level to generate on the the server-side by simply passing an HTTP header.
There is a common pattern emerging which is to use Docker to build the software artefact. This approach has become popular since your machine or CI agent is not required to have anything installed but Docker. However, if you have tried this before with Java/Maven, you are most likely to know how slow it can be to see Maven download half of the internet inside the container in every single run. Here I show you how to address that issue with a simple trick.
Almost every application needs to handle data in an interchangeable format. In the world of http JSON based API’s, the task of serializing and deserializing the payloads are something usually delegated to a third party library. Some examples are Jackson, Gson and the most recent Java EE spec JsonP. What if there is a way where applications can be decoupled from these providers in a similar fashion of how SLF4J does for logging? That’s the goal of Payload.
A guide to get you started with the implementation of a software build pipeline in Travis CI that automatically gets your code released to GitHub and pushed to a Docker registry. It takes you through some extra features such as Java’s JAR signing (GPG) and encryption of secret data for your build. The examples assume that Java and Maven are in use. Furthermore, if releasing to Maven Central is your goal, this guide will take you right there at the door.
The business around API’s is growing these days. There has been quite a lot of talking about how companies should be building platforms to achieve innovation and reach new markets. It’s all about opening your business to let others create value on top of it. The financial industry (i.e. banks) is taking the lead in this area. One thing I didn’t realize before is how similar this movement is to the old gold SOA.
About an year ago I’ve stumbled upon this interesting little framework called Spark Java. If you are looking for a lightweight alternative to quickly develop REST APIs in Java, you might like this.
A few weeks ago I decided to engage in a project of building a blog. I was looking for challenges, I wanted to build something of my own, without using some of these well known platforms like Wordpress, Blogger, etc. It was more about the journey and satisfaction of dealing with a domain that I was never very familiar with: front-end development.