changcheng / wro4j

Automatically exported from code.google.com/p/wro4j
0 stars 0 forks source link

ConfigurableWroFilter configuration with Properties file #216

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Instead of configuring each property of the ConfigurableWroFilter, allow 
externalizing all configurations to a property file.

As a result, instead of:
<bean id="wroFilter" class="ro.isdc.wro.http.ConfigurableWroFilter">
  <property name="debug" value="${application.wrofilter.debug}"/>
  <property name="cacheUpdatePeriod" value="${application.wrofilter.cache-update-period}"/>
  <property name="modelUpdatePeriod" value="${application.wrofilter.model-update-period}"/>
</bean>

will be:
<bean id="wroFilter" class="ro.isdc.wro.http.ConfigurableWroFilter">
  <property name="properties" ref="wro4j.properties"/>
</bean>

Where wro4j.properties is a bean refering a property file with the following 
content:

debug=true
cacheUpdatePeriod=10
....

This approach will allow a single point of wro4j configuration.

Original issue reported on code.google.com by alex.obj...@gmail.com on 14 May 2011 at 9:41

GoogleCodeExporter commented 9 years ago

Original comment by alex.obj...@gmail.com on 14 May 2011 at 11:39

GoogleCodeExporter commented 9 years ago

Original comment by alex.obj...@gmail.com on 14 May 2011 at 11:40