Issue Description:
For convenience, it is possible to use a custom bean definitions file as an alternative to setting overrides directly within JasperReports Server's various bean definition files. Some customers would like this approach as a way to simplify the tracking of their changes.
Resolution:
Our bean definition post processor can be used to make the overrides. Below is an example for overriding the default FileVirtualizerFactory configured in applicationContext.xml. The original snippet associated with FileVirtualizerFactory in applicationContext.xml is:
<!--report virtualizers--> <bean class="com.jaspersoft.jasperserver.api.engine.common.service.impl.FileVirtualizerFactory" id="fileVirtualizerFactory"> <property name="maxSize" value="300" /> <property name="directory" value="${java.io.tmpdir}" /> </bean>
To override, first create a new xml file with a perinent name, like applicationContext-my-customizations.xml (example attached). Then simply add the following, with your own useful documentation, of course:
<bean class="com.jaspersoft.jasperserver.api.engine.common.service.impl.SwapFileVirtualizerFactory" id="myFileVirtualizerFactory"> <property name="tempDirectory" value="${java.io.tmpdir}" /> </bean> <bean class="com.jaspersoft.jasperserver.api.common.util.spring.BeanDefinitionOverrider" lazy-init="false"> <property name="originalBeanName" value="fileVirtualizerFactory" /> <property name="overridingBeanName" value="myFileVirtualizerFactory" /> <property name="mergeProperties" value="false" /> </bean>
Ref. Case #00030558
Recommended Comments
There are no comments to display.