Lets say I have an implementation class already defined and now to be able to support SOLID principles, now I need to expose an interface for the implementation class so that we can perform the dependency injection. My existing class…
Category: Java
Sort members in the Java class in Spring STS
In the post Generating Getters/Setters in Spring STS we have seen how to generate the Setters and Getters for private fields in the class. But the code looks cluttered and not sorted in a proper order. So, if you want…
Generating Getters/Setters in Spring STS
If you create a class with private fields and you now needs to assign values from outside the class, you can achieve the same with two methods: 1. Create a parameterized constructor and asking the properties to the private fields.…