Announcement Announcement Module
Collapse
No announcement yet.
How to inject dependency for a variable where value is coming from a property file? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to inject dependency for a variable where value is coming from a property file?

    Hi, I have to create a spring Bean like,

    @Service
    public class TestService implements ITestService
    {
    @Autowired
    private ISomeOtherService someOtherService;

    private String someProperty;
    }

    I want to initialize the value of attribute "someProperty" from a properties file. But i am not sure about the autowiring of the variable which will be read from the property file. Please suggest me possible solutions ? I don't was to use xml based bean wiring method.

  • #2
    I think this is what you need

    http://forum.springsource.org/showth...796#post371796

    Comment


    • #3
      Thanks Wesker. This is what i was looking for.

      Comment

      Working...
      X