This is a syntax question about Spring configuration (see spring - beans -3.1.xsd and spring -mvc-3.1.xsd).
I have a specific bean definition (id = "SecurityRequestParametersArgumentResolver") that I want to register as a custom argument resolver. Xml snippet:
<bean id="SecurityRequestParametersArgumentResolver" class="xxx.security.web.SecurityRequestParametersArgumentResolver"> <property name="credentialsManager" ref="CredentialsManager" /> <property name="tokenService" ref="TokenService" /> </bean> ... AND I would like to use a bean reference. The following three lines don't obey the xsd-grammar ( what should be the correct tag declaration here? ) <mvc:annotation-driven> <mvc:argument-resolvers> <bean ref="SecurityRequestParametersArgumentResolver"/> </mvc:argument-resolvers> </mvc:annotation-driven>
... All the examples that I saw look like THIS, and therefore come after the default no-argument constructor
<mvc:annotation-driven> <mvc:argument-resolvers> <bean class="class="xxx.security.web.SecurityRequestParametersArgumentResolver"/> </mvc:argument-resolvers> </mvc:annotation-driven>
Repeating the question, what should Spring syntax be like to use a bean reference as a custom argument argument?
Thanks!
source share