Announcement Announcement Module
Collapse
No announcement yet.
ResourceBundleMessageSource in Batch Programs Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • ResourceBundleMessageSource in Batch Programs

    Hi,

    My batch programs are based on locations. The configurations vary based on locations.

    I am using ResourceBundleMessageSource to load configuration files.

    I am able to read the property files, if the properties folder is added to classpath. This should not be done. Because in our case the batch programs will be converted as JAR and run from either command line or AUTOSYS scheduler.

    Similar to web projects we should be able to load property files.

    One way i could do ''with out loading properties folder" in classpath is:
    Code:
    <bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource">
    <property name="basenames">
    <list>
    <value>file://localhost/c:properties/Config/abc_Config.properties</value>
    <value>file://localhost/c:properties/SQL-Queries/xyz_SQL.properties</value>
    <value>file://localhost/c:properties/SQL-Queries/lmn_SQL.properties</value>
    </list>
    </property>
    </bean>
    Is there any way where, i can get rid off "file://localhost/c:" (Mentioning drive name). Tried different ways not to mention drive name, but its of no use.

    Thanks
    Mahesh
Working...
X