Spring From the Trenches: Returning Runtime Configuration as JSON

If we need to figure out the runtime configuration of a Spring web application that is deployed to a remote server, we need to the read the properties file found from the remote server. This is cumbersome. Luckily, there is a better way. This blog post describes how we can Write the runtime configuration to […] Read more

Writing Clean Tests - Small Is Beautiful

We have learned that "clean" unit tests might not be as clean as we think. We have done our best to make our unit tests as clean as possible. Our tests are formatted properly, use domain-specific language, and avoid excessive mocking. Nevertheless, our unit tests are not clean because: When we make changes to the […] Read more

Spring Framework has a good support for injecting property values found from properties files into bean or @Configuration classes. However, if we inject individual property values into these classes, we will face some problems. This blog post identifies these problems and describes how we can solve them. Let’s get started. If you use Spring Boot, […] Read more

Writing Clean Tests - Trouble in Paradise

If our code has obvious faults, we are very motivated to improve it. However, at some point we decide that our code is "good enough" and move on. Typically this happens when we think that the benefits of improving our existing code are smaller than the required work. Of course, if we underestimate our return […] Read more

Getting Started With Gradle: Creating a Web Application Project

This blog post describes how we can create a web application project with Gradle. To be more specific, we want to create a web application project that uses Java, package our web application into a WAR file, and run our web application in a development environment. Let’s find out how we can fulfil these requirements. […] Read more

Writing Just Enough Documentation

One of the misconception that is often associated with agile software development is that agile teams won’t write any technical documentation. I assume that this misconception is so common because the agile manifesto states that we should value working software over comprehensive documentation. Also, since some of us have experience from writing long technical documents […] Read more