REST & JSON basics
For REST https://restfulapi.net/resource-naming/ is a very good source to start reading and a guideline for JSON can be found under https://google.github.io/styleguide/jsoncstyleguide.xml.
REST & JSON basics Read More »
For REST https://restfulapi.net/resource-naming/ is a very good source to start reading and a guideline for JSON can be found under https://google.github.io/styleguide/jsoncstyleguide.xml.
REST & JSON basics Read More »
I created a github action config for detekt 1.19.0 based on Java 17 because the template from GitHub was using a much older version and also didn’t work for me.
GitHub Detekt action with Detekt 1.19.0 Read More »
I was trying to build a spring boot application based on spring spring-boot-starter-webflux which is based on kotlinx-coroutines-reactor. The API definition was done with OpenAPI-Generator with “kotlin-spring” generator and “spring-boot” library. Setting the configOptions useBeanValidation and reactive to true generates suspendable methods and uses webflux. And adding hibernate-validator allows to use bean validation for every
ArrayIndexOutOfBounds with Kotlin coroutines and Hibernate-Validator Read More »
Using unmodifiable variables – so called values in Kotlin with keyword val – should be the default where possible but it’s not always practical to initialise all values within the constructor. Kotlin offers the option to use “by lazy”. With some common kinds of properties, even though you can implement them manually every time you
Delegate value initialisation with “by lazy” in Kotlin Read More »
Project lombok has become a defacto standard in close to every Java project I see. Because of this I want to also write about the ongoing log4j problems as described under https://blog.coffeebeans.at/archives/1709. The annotation @Log4j allows to create a log4j logger field in the annotated class. This of course implicates that your project is using
Lombok and log4shell Read More »
I’ve been using Netflix Zuul for many years as a proxy for APIs. Some weeks ago I tried to bootstrap a new project and add the zuul starter via spring initializr and couldn’t find it anymore. After some research it seems that Spring Cloud has moved over to Cloud Gateway and discontinued Netflix Zuul. Maybe
Moving from Spring Cloud Netflix Zuul to Spring Cloud Gateway Read More »
I’ve started to write a simple plugin to analyse gradle projects and send dependency information to a central server. This way I want to get insight into all projects in the company and check if there is some log4j2 dependency below 2.16.0. You can find the code under https://github.com/mbogner/gradle-status-plugin. The plugin was accepted and is
gradle status plugin Read More »
MongoDB supports horizontal scaling by the use of sharding. A sharded cluster consists of 3 parts: Configuration replica set to store metadata Shard replica set(s) Mongos server as a query router that uses metadata from config replica set to query data from the shard(s) Every replica set can consist of primary and secondary instances. Single
MongoDB sharded cluster Read More »
I was looking for a way to validate JSON data structure with the schema saved in the database. PostgreSQL has a very cool way to store json in JSONB fields but the question was how to validate this without extra PostgreSQL plugins and integrated in hibernate’s lifecycle with bean validation. Under https://github.com/mbogner/schema-validator I came up
JSON in PostgreSQL with application side validation Read More »
After finding a solution for my png files (see here) I was also looking for jpeg and found mozjpeg which is available via brew – like imagemagick and convert. For jpeg files I came up with the following command for optimisation: To use cjpeg from mozjpeg I changed my PATH variable so that mozjpeg comes
Optimise JPEG for web Read More »