dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #43749
Moving dhis.conf as a classpath resource
Hi Lars
Had a question regarding dhis.conf being external to the system( as in, in
the DHIS2 home).
Would there be a chance where we plan to move this properties file as a
classpath resource.
There are multiple advantages to it. Please see this snippet for more
details:
<bean id="retryPolicy" class
="org.springframework.retry.policy.SimpleRetryPolicy">
<property name="maxAttempts" value="*${metadata.sync.retry}"*/>
</bean>
<bean id="dhisProperties"
class="*org.springframework.beans.factory.config.PropertyPlaceholderConfigurer*">
<property name="location" value="classpath:dhis.conf" />
</bean>
We can leverage Spring's *PropertyPlaceholderConfigurer *to substitute the
property placeholders dynamically.
We can also inject the property values using the @Value annotation.
Any thoughts?
--
With Regards
Vanya
ThoughtWorks Technologies
Hyderabad
--Stay Hungry Stay Foolish!!
Follow ups