I want to initialize a Map of Maps in the Spring context file. I'm getting this xsd error.
cvc-complex-type.2.4.d: Invalid content was found starting with element 'map'. No child element is expected at this point.
This is the bean defnition:
<bean id="voToDOMapper" class="com.yyy.yyy.yyy.yyy.configuration.VOToDOMapper" factory-method="getInstance">
<property name="channelToMapper">
<map key-type="java.lang.String" value-type="java.util.HashMap">
<entry key="yyy" >
<value>
<map>
<entry key="com.yyy.yyy.yyy.AsyncAddressChangeEventVO">
<value>com.yyy.yyy.yyy.vo.yyy.FakeAcctAddressEvent</value>
</entry>
</map>
</value>
</entry>
</map>
</property>
</bean>
Any help will be appreciated.
One way
<util:map>
<entry key="x" value-ref="val1"></entry>
</util:map>
<util:map id="val1">
<entry key="a" value="blob"></entry>
<entry key="b" value="clob"></entry>
</util:map>
enable xmlns:util="http://www.springframework.org/schema/util
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With