Results 1 to 3 of 3

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

Hybrid View

  1. #1
    Join Date
    May 2011
    Posts
    4

    Question 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. #2
    Join Date
    Dec 2010
    Posts
    29

  3. #3
    Join Date
    May 2011
    Posts
    4

    Default

    Thanks Wesker. This is what i was looking for.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •