Category Archives: Java

Spring Boot & Multi module projects – Adding module specific property files [Updated]

Hello! In this post I will show you several ways how you can add module specific properties files in a Spring Boot project. It will cover a manual approach for making the property files profile aware and a semi automatic way that is profile aware. An example project is published on my Github account (https://github.com/coders-kitchen/spring-boot-multi-module-property-files). […]

 

5
Kudos
Don't
move!

Read more

JUnit rules – executing additional verification when exceptions are thrown

In this post I will show you quickly how handy JUnit rules are if you need to solve the following challenge A method catches an exception and has to perform some extra tasks before rethrowing or throwing a wrapper exception. Calls to the extra tasks and the thrown exception should be verified by a unit test. This means you have some […]

 

1
Kudos
Don't
move!

Read more

JGroups: Leader election without additional infrastructure

Hi there, in this post I’ll show how you can solve the problem of leader election without using any additional infrastructure like Apache Zookeeper or Consul. Leader election is a common way to solve the problem that in a distributed system only one instance must do a particular job. This could be for example triggering scheduled jobs […]

 

5
Kudos
Don't
move!

Read more

Combining the power of Gradle, Flyway and JOOQ for seamless development with databases

Hi there, in this post I will show you how easily you can combine the power of Gradle, with Flyway and JOOQ. At the end you will have a recipe for a build that automatically updates the models whenever you update your database. The problem When developing applications with database access, we usually face the problem, that we […]

 

16
Kudos
Don't
move!

Read more

Released : CDIProperties – v.1.0.0

Inspired by the tutorial about writing CDI extensions I wrote several days ago I created a CDI extension which targets exactly this topic CDIProperties This handy library enables a CDI (in a standalone or application server environment) application to directly inject properties from a property file. It’s extensible via an SPI, so that you can […]

 

0
Kudos
Don't
move!

Read more

Tutorial: Writing your own CDI extension

Today I will show you how to write a CDI extension. CDI provides a easy way for extending the functionality, like adding own scopes, enabling java core classes for extension, using the annotation meta data for augmentation or modification, and much more. In this tutorial we will implement an extension that will inject properties from […]

 

6
Kudos
Don't
move!

Read more

DataFX – @Named support (accepted)

During the christmas and new year holidays I implemented the @Named feature for DataFX. It’s already accepted and merged into the validation branch of DataFX (Thanks to Hendrik Ebbers). This feature enables a user to inject different instances of a bean into a controller, distinguished by a resource name via @Named annotation. You can, for […]

 

1
Kudos
Don't
move!

Read more