File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Spring properties value

 
kri shan
Ranch Hand
Posts: 1453
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<bean id="configuredProperties" class="com.sample.SpringPropertiesBean">
<property name="location" value="classpath:/test.properties"/>
</bean>

SpringPropertiesBean extends from org.springframework.beans.factory.config.PropertiesFactoryBean and properties(test.properties) are loaded in this class.


<bean id="sample"
class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
<property name="arguments">
<util:properties>
<prop key="java.security.auth.login.config">###########</prop>
</util:properties>
</property>
</bean>


java.security.auth.login.config key and respective value is defined in the test.properties file. How should i get the java.security.auth.login.config prop value for the bean sample ? Can i use <util:properties> or <props> tag ?
 
kri shan
Ranch Hand
Posts: 1453
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any update ?
 
Bill Gorder
Bartender
Posts: 1682
7
Android IntelliJ IDE Linux Mac OS X Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think this previous post should help you.
http://www.coderanch.com/t/585098/Spring/spring-expressions#2665905
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic