Wick Technology Blog

Phil Hardwick

Written by Phil Hardwick

A Java Library Release Process Which Doesn't Suck

August 07, 2020

Everytime I read about Maven’s release process it makes me groan. There must be a better way than this. Something less manual, with less…

Refactoring Branches out of Spring Controllers with Params

July 17, 2020

There’s a lesser known way of specifying which method in a Spring controller should be executed based on the query parameters sent to it…

Changing Bootstrap Theme at Runtime with CSS Variables

July 03, 2020

Bootstrap is a well-known framework for quickly building websites and apps. The way to customise it is well documented - override the SASS…

Using Micronaut Annotation Mapping to Automatically Add Security Info to Swagger Docs

June 26, 2020

In my last post I introduced how to create a custom security rule in Mirconaut which allows you to secure an endpoint by requiring a…

Custom Micronaut Security Rules

June 20, 2020

Micronaut comes with a few useful security rules such as ip filtering, url pattern matching and an annotation inspecting rule. However…

8 reasons you should use GitOps

June 12, 2020

What is GitOps Before saying why GitOps is so useful, I should explain what it is. At its most basic, GitOps is defining all the…

React Map GL - How do I test this?

June 06, 2020

How do I test this? This is a common question I ask myself when writing a new feature. Sometimes it’s not so easy and you need to truly…

Adding Observability - Tracking Exceptions

May 29, 2020

This post will show how to easily observe exceptions in a Spring Boot application, using Honeycomb and Aspect Oriented Programming…

Facts about Pacts

May 22, 2020

In Mettle , Pact was used to break up deployments and releases so that big bang releases were avoided. Previously testing had been done…

Prompt to install a PWA on iOS and Android with React Hooks

May 13, 2020

So you’ve got your service worker, your manifest.json and your app works offline, but how do you get your users to install the app? This…

Don't use Event Sourcing if you want auditability

May 05, 2020

The reasons for choosing an architecture can be so varied. We take into account customer needs, stakeholder requirements, legislation and…

Distributed API Documentation - How to Aggregate Swagger

April 29, 2020

Publishing API documentation across a whole system of microservices can be difficult. The services are small and split up, they may be…

Agreeing on state across microservices

April 24, 2020

At Mettle, our system is event driven. Services communicate and collaborate by sending events. But when information is sent asynchronously…

Constantly Evolving Code

April 21, 2020

As software engineer it feels so important to write code or microservices in a consistent way. This helps maintainability and…

Testing Micronaut Kafka Streams

April 17, 2020

Here’s an example of integration testing Micronaut Kafka Streams applications - https://github.com/PhilHardwick/micronaut-avro-streams…

Kafka Streams testing - Offsets out of range

April 17, 2020

When unit testing if you get this error: It means you may have some leftover state from a previous run of your tests - particularly if you…

A Second Chance at Pact

April 11, 2020

credit: Manu Cornet Second chances are a wonderful thing. In software a clean slate offers the opportunity to do things better, to improve…

Configuring Micronaut Kafka with Serialisers and Deserialisers

April 04, 2020

Here are all the ways you can configure Micronaut Kafka , both regular applications and streams, to use particular serialisers and…

Kafka Avro message format in Micronaut Tests

December 29, 2019

Update - 18th June 2020 As of Confluent version 5.4.0 it’s best to use Confluent’s built in mocking system. Simply define your schema…

Testing Micronaut Kafka

December 28, 2019

When testing Kafka in Micronaut you can use embedded Kafka or use Testcontainers . Configuration To use embedded Kafka set these…

Micronaut Test Configuration

December 28, 2019

When configuring the test of a Spring Boot application, you may be used to using an application properties file e.g. in with the same…

Paging a http endpoint by recursion

August 01, 2019

Paging the results of REST API calls is a good opportunity to show recursion and how it differs from just using loops. Recursion requires…

Sensible feign client configuration

July 05, 2019

Feign clients make it easy to write restful client based on the Spring annotations you already know. It also includes integrations with…

Remembering learnings in Java with Terraform

June 18, 2019

When learning a new language it’s always interesting to see how it changes your perspective. It can show you how little you know, show you…

Distributed Spring State Machines

June 12, 2019

Race conditions are annoyingly difficult to deal with. When it works sometimes but not all the time, and timing of events needs to be…

When Kafka doesn't restart (memory allocation error)

June 09, 2019

It was both worrying and very interesting - Kafka went down and wouldn’t restart. I experienced not being able to restart kafka because of…

Producing messages from Spring Cloud Stream v2 which v1.3 can understand

May 07, 2019

When using microservices, each service is standalone. It can use whichever technology, language, version that it needs to, in order to…

Upgrading to use JUnit 5 for Spring Pact tests

April 12, 2019

When using the Spring Pact provider library provided by DiUS, verifying pacts that your Spring applications provide is super easy. The…

Testing postgres with Spring in concourse

April 11, 2019

When you are testing code which uses a database in Spring tests there are a few options: use an embedded database like h2 which emulates…