Testing @ConfigurationProperties in Spring Boot I recently worked on a library for using AWS Kinesis in Spring Boot. As many other libraries, this particular one provided a powerful configuration. To implement the configuration, we used Spring Boot’s @ConfigurationProperties (as described here). This article gives some insights on how we did our testing. You can find the source code on GitHub: […]
Object updater pattern in Kotlin Updating data is one of the most frequent use-cases in applications. But it might also be a painful task which results in a bunch of ugly code. I recently stumbled over a typical update scenario in a Domain-Driven-Design (DDD) application. In the following, I want to show an elegant solution implemented in Kotlin (a Java […]
Encapsulated modules and clean tests with Spring’s @Configuration Usually we use Spring’s @Configuration to define some special beans. A classic example is the definition of a data source: 1234567 @Beanpublic DataSource dataSource() { DataSource dataSource = new DataSource(); dataSource.setUsername(username); // ... and so on ... return dataSource;} However, we can also use Spring’s @Configuration to build better modules which helps us to writer cleaner tests. Let’s go through an example. An example Let’s assume we have an application which uses domain […]
DDD with Kotlin I recently made my first steps with Kotlin. After exploring the language for a couple of weeks, I tried to translate one of my favorite architectural patterns from my Java background to the Kotlin world – Domain Driven Design. Example project I’ve prepared an example project on GitHub showing some of the most important concepts […]