javacodegeeks.com javacodegeeks.com

Quarkus' additional (non-standard) CDI features

Quarkus supports CDI (Contexts and Dependency Injection) 2.0, but not all of it, only the most common features. However, Quarkus does include some non-standard features that can come in quite handy to developers which I want to show in the following video. Whether or not you’re familiar with CDI, if you use Quarkus you should have a look at the guide for Contexts and Dependency Injection which nicely explains the ins and outs of...

javacodegeeks.com javacodegeeks.com

The Feature Magnet

God, I hate enum in Java. (Well, I don’t, but it got your attention didn’t it!?)Here’s a simple chain of events, leading to an odd conclusion:We have a component that can do processing based on configurationWe decide to put the different operations it could do into an enum so that we control the valid valuesThe code that correlates from the enum to the algorithm to process each operation goes into the same library as the enum (or...

javacodegeeks.com javacodegeeks.com

Docker Compose for Spring Boot application with PostgreSQL

In this blog post you will learn how to configure Spring Boot application with PostgreSQL for running with Docker Compose.This blog post covers:Spring Boot application Dockerfile configuration with clean separation between dependencies and resourcesDocker Compose configuration for running the application with PostgreSQLPrerequisitesDockerJava 13Terminalhttpie (or curl)ApplicationGenerate the Maven based Spring Boot application with...

javacodegeeks.com javacodegeeks.com

Java 14 New Features

On 17th March 2020, Oracle has released a new version of Java named Java 14, which includes lots of new features, improvements in tooling, security, debugging, and updated documentation. However Oracle also provides you with the older version of Java as backward compatibility so your previous code can still run on older versions, and it’s not that Java 14 has an entirely different syntax as compared to Java 8 or 9, it’s...

javacodegeeks.com javacodegeeks.com

Rotating secrets in Kubernetes

I’m building a multitenant SaaS on top of Kubernetes at the moment, and one principle we’ve gone with is that all secrets should be rotated regularly. I’m surprised by the distinct lack of documentation on best practices for how to supply this configuration in Kubernetes.Of course, when it comes to certificates, it’s fairly straight forward to rotate a certificate using cert-manager, but even that isn’t quite solved –...