java - dynamically changing entry value of util:map in Spring -


i have defined below map definition in spring config file,so clientlist map object.so question is,i want change entry key "java" value based on other condition.

<util:map id="clientlist" map-class="java.util.hashmap">  <entry key="java" value="manualtest"/>   <entry key="c" value="qtp"/>  </util:map> 

so here,i can after getting map object , using if conditions.is otherway can in spring config file before spring container returns object?

is possible define

other bean determines value of entry?

regards,

raj

what if this:

<util:map id="clientlist" map-class="java.util.hashmap">     <entry key="#{t(com.myconditionclass).getcorrectkey()}" value="manualtest"/>       <entry key="c" value="qtp"/>  </util:map> 

here getcorrectkey() static method , (com.myconditionclass).getcorrectkey() called before spring container build up, want careful not rely on spring bean in method since not ready yet.

check this


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -