Author Archive

When you’re using PostgreSQL together with Slick, chances are high, that you’re also using the Slick-PG library. You probably came to this post, because you try to map your custom ADT to a List/Sequence of that and want to store it as a text[] (or other array) in PostgreSQL. When trying to do so, the […]

Scala HMac SHA256

21, Nov 2020

As I repeatedly (e.g. every 2nd year) have to find the right code to generate a HMAC SHA256 hash from a string, I’m sharing this (for me and others) here. The tricky part is the String-Format to 64 chars. Most code I’ve found had this set to 32 chars (like used for MD5) which resulted […]

This is mainly a note to self on how to build inheritance hierarchies (e.g. Animal -> [Cat / Dog] ) with Play-JSON. Documentation can be found here: Play-JSON Akka-Http Play-Json

As mentioned in my previous articles about using VAVR together with Spring, use the following classes to make VAVRs Option and all Collection types based on Seq work correctly with SpringDoc. Just place them in a package that gets scanned by Spring! A big shoutout to bnasslahsen who provided me with the VavrOptionSupportConverter that I […]

During the Corona crisis, I was in urgent need of a Webcam. While I thought I ordered a Logitech C930e Business webcam, I got shipped a C930c which is basically the same one but the chinese version. As it is now the second time I was spending time to find drivers / controller software for […]

As already documented in my previous article about Spring and VAVR, I’m using the Future’s provided by VAVR as return types in my controller. What I’m also using, is the SpringDoc OpenAPI library to generate my OpenAPI specification. By default, SpringDoc has no clue about VAVR and how to handle its Future type. Thus, by […]

Learn how to use the Future of Vavr in a Spring Boot Project

If you’re developing Scala apps and let them be checked by Codacy, you might have enabled the check “Imports should be sorted alphabetically“. What sounds easy, isn’t in fact. Here are my findings, summarised as example imports. I hope this helps someone.. I’m sure, I’ll check back on this page in about a week again….

In an event-sourced environment, you sometimes have to introduce an artificial delay to some actions to make sure read-sides had the time to update themselves. If you’re using the classic routing mechanism with a routes-file, you can add such a delay declaratively, like here: This would delay the response of the update-action by 800 Milliseconds, […]

If you have to create a stored procedure in your PlayFramework Database Evolution Script, make sure to properly escape your semicolons (by using two semicolons):


top