Posts

Junit5 Summary

Dependencies Junit5 is constructed by 3 modules: Junit-Platform, Junit-Vintage, Junit-Jupiter. Jupiter The core package the provide all the unit test functionalities. Platform This packages is the engine that provides the functionality to execute tests on a platform. Vintage Support for Junit4. Maven Maven Dependencies are: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 <dependency> <groupId>org.

Spring MVC Layer Seperation

While moving data between a controller and a service layer or even further, Java Optional comes very handy. How to apply Every method in a controller or service that is at least package private should return an Optional<>. By doing so use of these functions can be done in a very fluent way. Because a lot of the time these classes are dealing with technical concerns and resources the result can be null.

Best Practises

In the last couple of days I spend some time of learning more about Junit5. I did my way through some online courses on Pluralsight. During the analysis on the material from the course, I realized that there are some good ideas on how to solve a specific task. I was wondering because, I have solved these tasks over and over again in the past, but every a little bit different.

Serialization of Java Money

The Spring frameworks helps with a lot of Java’s overhead configuration. Most of the time things just magically work. But sometimes not. Problem Spring uses Jackson for the serialization and deserialization of objects to and from json. It is very powerful and extendable. The serialized output can be placed as a value or payload in a Kafka message or used to send a response from an api. But here comes the problem.