In previous post under MapStruct, I showed how to create a custom mapper method and how MapStruct framework calls it. For recap,1) sometimes we cannot depend on the mapping method created by MapStruct. So we create our own custom mapper method which takes care of mapping one object properties to another object properties.2) We instruct…… Continue reading Passing the target type to custom mapper
Month: December 2025
Implementing instance factory method using Spring annotations
In this post under Spring Core, I will show how to implement instance factory method using Spring annotations instead of using xml approach. For our example, lets create “Calculator” class with below structure, whose bean we have to create using instance factory method Calculator package core.package53; public class Calculator { public void calculate() { System.out.println(“Calculating….”);…… Continue reading Implementing instance factory method using Spring annotations
Implementing static factory method using Spring annotations
In this post under Spring Core, I will show how to implement static factory method using Spring annotations instead of using xml approach. For our example, lets create “Calculator” class with below structure, whose bean we have to create using factory method Calculator package core.package52; public class Calculator { public void calculate() { System.out.println(“Calculating….”); }…… Continue reading Implementing static factory method using Spring annotations
IllegalSequenceRule with custom character sequences example 2
In previous post under Passay, I showed one example of how to use “IllegalSequenceRule” with custom character sequences. This post is continuation of the previous post with another example. In the previous post, I used different two custom character sequences, one character sequence containing only numbers and another character sequence containing only alphabets. In this…… Continue reading IllegalSequenceRule with custom character sequences example 2
IllegalSequenceRule with custom character sequences example 1
In previous post under Passay, I showed with example the purpose of “IllegalSequenceRule”. For recap, this rule makes sure that the password doesn’t contain the given character sequence, for example “qwerty” character sequence. So if the password is “qwerty” or “sam_qwerty_@”, the validation will fail but if the password is “aabb”, the validation passes. When…… Continue reading IllegalSequenceRule with custom character sequences example 1