Annotation injection is performed before XML injection, thus the latter configuration will
override the former for properties wired through both approaches.
In terms of injection, above implies that when a property is able to find a value through both annotation and xml configuration, 2 settings will be done, whereby the annotation setting is the second, and therefore the final value.
With regards to if this applies to the 'scope', we may need to test ourselves. I dont find the above statement clear if it applies to the attributes like 'scope'.
The bean in xml was not given "scope" explicitly, i.e., it is like this:
<bean id="simpleAction" class="com.sapient.SimpleAction"/>
In java class, annotation was given scope explicitly.
But finally, the scope of the bean is singleton from its behaviour.
That might mean, when bean is defined in the xml file, it overwrites all the properties specified elsewhere that are applicable for the bean.