@Rob/@Stephan- I want to pass MyObj is in the constructor, the reason is Class A is base class and it will have some common methods where MyObj is needed for the mapping so I am passing it to the constructor and initializing instance variable which I can use in both superclass and subclass.
@Tim - Sorry I have mentioned it incorrectly Actually MyObj is not the user-defined class. It is the class from the third party library.
Stephan van Hulst
posted 1 month ago
Even if it's from a third party, you can still provide an instance of it in your beans.xml or through a bean factory.
Sac Jadhav wrote:@Stephan, to be specific. It is AbstractMx object which I get when parser swift message
Spring isn't really designed for dealing with the idea of injecting dynamic objects into the objects it creates. Basically, if you want to construct an object that references another object and that other object cannot be created on-demand when the first object is being constructed, then the first object shouldn't be attempting to obtain the second one at construction time.
"privilege" comes from the Latin words for "private" and "law" (legal) and dates to feudal times. To "claim privilege" meant that you were above the laws that applied to the common people.