Category Archives: Programming

#SpringBoot : Create a conditional Spring Boot Bean only if asked by an external configuration, not using @Conditional #Java

By | September 7, 2022

Usually Spring Boot beans are created automatically before the application start and autowired as needed. What if we need to create a Spring bean only if some configuration file requires it. This way of writing code is very useful when trying to write highly configurable enterprise applications where you want to be able what components… Read More »

#SpringBoot : How to create multiple instances of the same Spring Bean type. #Java

By | September 9, 2022

Spring Boot assumes that all the created beans are singletons. That works OK for 90% of the cases when Spring Boot is used but sometimes we need several instances of the same bean type. One example is when our bean is a kind of “interface service” that is reading or writing data to another external… Read More »

#Bash one liner: Remove all occurrences of a tag block from an XSD or XML file using #sed #xmlstarlet

By | April 1, 2022

Sometimes you get some XLS schemas that are full of additional annotations and comments you want strip. Annotations and comments are nice but annoying when trying to compare two incremental versions of some schema and try to pin point just the differences. Bellow there is a script used to remove all comments and the <xs:annotation>… Read More »

Filter #XML Documents using #XPATH2 Transforms for signature digests #banking #fintech

By | November 26, 2021

While working with XML Documents and trying to implement the XMLSignature I hit the issue of filtering what to sign from an XML. The basic documentation of the from XML signature standard XML Signature Syntax and Processing Version 1.1 describes several methods that can be used to transform an XML to prepare it for signing.… Read More »

#Bash one liner: Change permissions recursively for a set of files matching a criteria

By | November 2, 2021

There is a neat way using a bash one liner to change attributes of all the files from a path and sub paths that match a criteria. As an example following line makes all the script files from a path and sub paths executable.

Get simple health status of a #SpringBoot application from #bash

By | November 2, 2021

Here I describe a bash script to extract only the health status of a Spring Boot application. As an example I used an adaptor application that interfaces between two external systems. Note that there several components of the adaptor that need to be monitored: control queues a database connection disk space input queues output queues… Read More »

#Bash one liner: Get a specific #DNS record entry line #LetsEncrypt

By | November 2, 2021

Another bash one liner that saved my sanity. While generating site wide certificates from LetsEncrypt you have to check if a certain TXT key was added to the DNS record (_acme-challenge). Here is the magic line that returns only that for my domain “voina.fr”. So when waiting to see if the DNS TXT record was… Read More »

Things worth reading: Some resources about Protocol Buffers in #golang and #gRPC

By | November 1, 2019

Looking around microservice communication protocols I discovered protocol buffers and gRPC as a new alternative to REST with XML or JSON. XML is used in standards like ISO 20022 for financial messages, JSON is widely used by all the new APIs in fintech (Stripe, TransferWise, lots of PSD2 API implementation of banks etc.) Both of… Read More »