With @ConfigurationProperties
in Spring Boot we can bind configuration properties to Java classes. The class annotated with @ConfigurationProperties
can be injected into other classes and used in our code. We can use the type DataSize
to configure properties that express a size in bytes. When we set the value of the property we can use a long
value. The size is then in bytes as that is the default unit. We can also add a unit to the value. Valid units are B
for bytes, KB
for kilobytes, MB
for megabytes, GB
for gigabytes and TB
for terabytes.
We can also use the @DataSizeUnit
annotation to specify the unit of the property in our class annotated with @ConfigurationProperties
. In that case a the value without a unit assigned to the property is already in the specified unit.
Continue reading →
Today is the 4th of October which is World Animal Welfare Day.
As a tribute, I would like to dedicate this blog to the man’s developer’s best friend: K9S.
All jokes aside, I would like to address the struggle I see with DevOps teams.
It is expected of every team member to possess the skills to manage your code but also the operations side like the CI/CD pipeline, and infrastructure like Kubernetes and Cloud providers.
Reality has learned that not every developer has extended knowledge of all those things like for example Kubernetes.
In this blog, I want to advocate for awareness of the difference in expertise and how I think you could help your team to learn and improve.
For example, the CLI and Kubernetes aren’t everyone’s besties, but with the CLI UI tool K9S, you can make Kubernetes a little more accessible for everyone.
Continue reading →
Config derivation with ZIO config and Magnolia.
Continue reading →
As software engineers, we are constantly looking for ways to build faster, more scalable, and more efficient systems.
But we often overlook one critical aspect: sustainability.
Just as in sports, where long-term success comes from balancing peak performance with endurance, sustainable software engineering is about creating systems that not only perform well today but also remain viable and efficient in the future.
Continue reading →
AssertJ already provides many useful assertions for all kind of types. But sometimes we want to define our own assertions for our own types. We can define new assertions by extending the AbstractAssert
class In this class we add methods that will check the values of our type. The names of the methods can reflect the domain model of our type. This can make our tests more readable and understandable.
Continue reading →
To compare nested objects we can use the usingRecursiveComparison()
method in AssertJ. We can set up the nested objects with values we expect, invoke a method that would return the actual nested objects, and then use the usingRecursiveComparison()
method to compare the actual nested objects with the expected nested objects. This is a very clean way to compare nested objects. Also when we would add a new property to the nested objects our test would fail as we didn’t use that new property yet for our expected nested objects.
Continue reading →
In our Tech Radar we put CloudEvents in the trial phase of the platforms quadrant.
We’d like to take you on a journey and show you what CloudEvents are and how they can be used.
In our Second blog about CloudEvents we showed you how they can be applied.
In this third blog we will be looking at CloudEvent extensions, a means to extend the specification with propriatary properties!
Continue reading →
In our Tech Radar we put CloudEvents in the trial phase.
We’d like to take you on a journey and show you what CloudEvents are and how they can be used.
In our First blog about CloudEvents we introduced you to the specification.
In this second blog we will be looking at how CloudEvents can be used in practice!
Continue reading →
In our Tech Radar we put CloudEvents in the trial phase.
We’d like to take you on a journey and show you what CloudEvents are and how they can be used.
In this first blog we will be looking at the CloudEvent specification and the serialized end result!
Continue reading →
Join me for my first look into GitHub Codespaces.
I’ll walk you through setting up some basic configuration, and some things to keep in mind.
Continue reading →