I'm not sure if this question has been asked before. I just couldn't find it.
I've just started learning Spring framework and I'm currently studying dependency injection and bean scope.
I have been able to create beans that can be referenced globally and the ones that we define inside a property tag or a constructor-arg tag.
But I haven't been able to create a bean that can be referenced by all the constructor-arg/all the property tags but that also can not be referenced
outside the bean in which these constructor args or property tags are defined.
Here is my faulty spring.xml. My application gets the triangle bean from the Spring container. The Triangle class has four fields- String type, Point point1, Point point2, Point point3,
and a parameterized constructor that takes all these four fields.
Point class has two fields, int xCord, int yCord and only getters and setters.
When I run my application, I get an org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException. Here is the trace.
At this point, I am not sure if Spring even provides for such an access. But I'm guessing there must be something Spring has to address the above requirement and I just haven't come across it.