Search This Blog


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">
    <prop key="cacheEnabled">true</prop>
    <prop key="safeRowBoundsEnabled">true</prop>

1 comment:

Pavel Co Ebele said...

Amazing & Great informative blog,it gives very useful practical information to developer like me. Besides that Wisen has established as Best Java Online Training India . or learn thru Online Training mode Java Online Training From India . Nowadays Hibernate ORM has tons of job opportunities on various vertical industry.