Whenever you are writing OOP, basic thing you will do is to create many types and create instances of the types in other classes. And unless we import the types in the code, you will see unresolved references error. Instead…
Tag: Spring
Generate Interface from Implementation class using Spring STS
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…
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.…