java - Is it possible use HashMultimap to create spring bean? -


xml:

<bean id="mybean" class="com.google.common.collect.hashmultimap">   <constructor-arg index="0" value="200"/>   <constructor-arg index="1" value="2"/> </bean> 

is correct? when try inject bean in like:

<property name="mybean" ref="mybean"/> 

i received error: cannot apply property values null instance

try this

<bean id="mybean" factory-method="create" class="com.google.common.collect.hashmultimap">     <constructor-arg index="0" value="200" />     <constructor-arg index="1" value="2" /> </bean> 

Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -