BigDecimal rounding to the nearest 5 cents with Java’s BigDecimal
Recently I hat to implement a function that would round to the nearest 5 cents and after googling around a bit I found bits and pieces here and there but none just worked for me, so below you can find a function that should do…
Custom converter for Mongodb and Spring Data for BigDecimal type
Recently I found that MongoDB does not support java’s java.math.BigDecimal as you can read in the official spring data mongodb documentation As it turns out java.math.BigDecimal will be converted to java.lang.String when saved to the database and parsed back to BigDecimal which in most cases…