TESTCONTAINERS
Are you struggling finding the right strategy for your integration tests? Mocking does not cover everything and relying on all external services to be present also gives you a headache. What if there was a way to start the real service in your integration tests?…
OAS3 AND SPRING BOOT
Looking for an easy way to document your Spring Boot API following the OAS3 specification? Use a Springdoc documentation endpoint, for OAS3 and Spring Boot! In this post we set up Springdoc and add documentation to an example endpoint. The code for the Springdoc project…
DEPLOY WITH HELM
Do you ever get lost in all the Kubernetes configuration files you defined for your application? When you deploy with Helm they are treated as packages and are easier to manage. In this post we will take the Kubernetes deployment we build in several previous…
SPRING AUTOCONFIGURE
Ever wondered how defining a property in Spring applications can automatically configure functionality? We are going to create this ourselves with Spring autoconfigure. We are going to setup a controller with endpoint with only a dependency and a property. For a more in depth discussion…
KUBERNETES AND PROMETHEUS
In an earlier post we saw how to deploy your Spring application to a Kubernetes cluster. Here we will see how to setup monitoring in your cluster where Kubernetes and Prometheus work together. Follow along to setup your own Prometheus instance! For more in depth…
JACKSON ANNOTATIONS
Jackson is a helpful tool when building REST API’s. In this post I will explain what Jackson annotations I use all the time. There are of course many more Jackson annotations for all situations (example tutorials here). Here we focus on the things you want…
DOCKER ON JENKINS
A lot of companies use Docker to unify their build process. Here we show how to set up a Jenkins pipeline using Docker. First follow my older post JENKINS ON MINIKUBE to get your own Jenkins instance running on minikube. Simple test application We need…
SPRING BEAN LOADING ORDER
Spring beans are not always loaded in the same order. The Spring container has freedom in the way beans are loaded and even in the smallest projects the order changes. Here are some ways to control this Spring bean loading order. One of the restrictions…
MIGRATION JAVA 8 TO JAVA 11 WITH SPRING BOOT 2
Upgrading a major version is always a pain. Although from java 9 up it’s supposed to be easier. In this post I will give some examples of the obstacles I encountered. The use case is a Spring Boot application, so we need to upgrade to…
CORS WITH ANGULAR AND SPRING BOOT
When we choose to follow any Angular and Spring Boot startup tutorials we end up with applications running on http://localhost:4200 and http://localhost:8080. Communication between the two can run into Cross-Origin Resource Sharing (CORS) blocking. Take a look at the getting started pages for Spring Boot and…