Link Details

Link 1204975 thumbnail
User 293991 avatar

By e_rajasekar
Submitted: Aug 29 2014 / 01:07

Sometimes you would need to inject value for spring bean propery by reading values from a file. Good use case for this would be injecting passwords into bean property by reading value from a file rather than hard coding password into application context xml. This can be done by creating property file with values we want to inject and use spring util properties to read values into application context as properties. Then, this property value can be injected using Spring SpEL.
  • 2
  • 0
  • 182
  • 555

Add your comment

Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Upvoters (2)

Downvoters (0)

    Apache Hadoop
    Written by: Piotr Krewski
    Featured Refcardz: Top Refcardz:
    1. Play
    2. Akka
    3. Design Patterns
    4. OO JS
    5. Cont. Delivery
    1. Play
    2. Java Performance
    3. Akka
    4. REST
    5. Java