Q: Declaring Beans using:-
Solution: Beans can be declared from static fields as well as Object properties.
Q: Ways to declare bean from a static field?
Solution: To declare a bean from a static field, you can make use of either the built-in factory bean FieldRetrievingFactoryBean, or the util:constant tag in Spring 2.x.
Q: Which tag is also allowed by static field?
Solution: Spring 2 and later allow you to declare a bean from a static field by using the util:constant tag.
Q: Declaring bean form object properties can be done using:-
Solution: To declare a bean from an object property or a property path, you can make use of either the built-in factory bean PropertyPathFactoryBean or the util:property-path tag in Spring 2.x.
Q: PropertyPathFactoryBean declares a bean from an:-
Solution: The factory bean PropertyPathFactoryBean can be used to declare a bean from an object property or a property path.
Q: Alternate way of PropertyPathFactoryBean to declare a bean.
Solution: Compared to using PropertyPathFactoryBean, it is a simpler way of declaring beans from properties.
Q: The Spring Expression Language can be accessed by:-
Solution: The expression language is available via XML or annotations.
Q: We can combine target Object and propertyPath properties as bean name/id of PropertyPathFactoryBean.
Solution: In addition to specifying the targetObject and propertyPath properties explicitly, you can combine them as the bean name of PropertyPathFactoryBean. The downside is that your bean name may get rather long and verbose.
Q: The propertyPath property of PropertyPathFactoryBean can accept only a single property name.
Solution: The propertyPath property of PropertyPathFactoryBean can accept not only a single property name but also a property path with dots as the separators.
Q: Inner Bean can be retrieved by it’s name.
Solution: Since inner beans are local to another bean, so can’t be accessed globally.
You Have Score    | /10 |