• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

Spring properties value

 
Ranch Hand
Posts: 1491
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 1491
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Any update ?
 
Bartender
Posts: 1682
7
Android Mac OS X IntelliJ IDE Spring Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think this previous post should help you.
https://coderanch.com/t/585098/Spring/spring-expressions#2665905
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic