Junit testing with Spring – part 2

In my previous post on the argument (Junit testing with Spring), I skipped a very interesting part of testing attributes in the code which are inside methods.

In these cases, Mockito it’s very helpful to solve the problem.

Continue reading


Java memory for singleton object

The Java Virtual Machine (JVM) manages the memory of the operation system in order to obtain the best performance by optimizing the usage of it.

In this article, I’ll put the focus on a particular part of the memory which involves the Singleton object in Java. This type of object, always more frequently used, make a good deal between the memory optimization and the performance result.

Continue reading

Custom Jdbc Spring 4 Authentication

Spring Security makes available a good base customizable authentication layer to transform a plain web application into a secure one.

In this article I’ll show some of the behaviours that are customizable in a Spring solution. Obviously, I won’t describe all the possible parts but only a brief part of them but, I’m sure, once you got them, it’d be easy to understand how to customize even the deeper part of the code.

Continue reading