Wednesday, October 9, 2013

How to create java.util.Properties bean in Spring

We can inject java.util.Properties bean in Spring  with a PropertiesFactoryBean.  Here is how I did for my mybatis setting values.

 <!-- mybatist setting properties -->

 <bean id="mybatisConfigrations" class="org.springframework.beans.factory.config.PropertiesFactoryBean">
  <property name="properties">
   <props>
    <prop key="cacheEnabled">true</prop>
    <prop key="safeRowBoundsEnabled">true</prop>
   </props>
  </property>
 </bean>

No comments:

False fear

There is a figure they said She talks to me It's a mischievous voice I can't deny that love They say she is pretty Smart and wa...