Announcement Announcement Module
Collapse
No announcement yet.
Classpath* in context:property-placeholder doesnt pick system classpath Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Classpath* in context:property-placeholder doesnt pick system classpath

    I have modified system properties in dmk.sh to include extra file path as classpath

    Code:
         -classpath $CLASSPATH:/home/testfolder/ \
    I have a property file in testfolder - test.properties

    My bundle has the following in its spring xml


    Code:
       <context:property-placeholder  location="classpath*:test.properties" />
      
      <bean id="test" class="com.pg.external.Test">
         <property name="testProp" value="${testprop}"></property>
      </bean>

    Now my test.properties is not found.

    So it it expected to find the property fiel in classpath ?

    when i change it to

    <contextroperty-placeholder location="file:/home/testfolder/test.properties" />


    it works fine . Am i doing anything wrong here ?

  • #2
    It seems that "classpath" is mapped to the bundle class path rather than the application class loader classpath.

    Comment


    • #3
      Yes you are right.

      Configuration changes are required in java 6 profile config and an explicit import in bundle manifest for the bundle to see this property file.

      Comment

      Working...
      X