Beans
Use preferences in Spring
Spring provides PreferencesPlaceholderConfigurer that can be used to load preferences.
<bean id="preferencePlaceHolder" class="org.springframework.beans.factory.config.PreferencesPlaceholderConfigurer"> <property name="userTreePath" value="com.myapp.preference.staticPreferenceLoader" /> </bean> <bean id="myEntity" class="info.dependencyInjection.spring.factory.MyEntity"> <property name="value" value="${fruit}" /> </bean>
Related Article:
Reference: Use java.util.prefs.Preferences instead of java.util.Properties from our JCG partner Rahul Sharma at the “The road so far…” blog