Friday, 1 August 2014

Convert Java-Based Configuration to Spring XML-based



I'm trying to convert Birt application done in java annotation here to XML based but 'am having difficulties changing this part to xml



@Bean
public BirtViewResolver birtViewResolver() throws Exception {
BirtViewResolver bvr = new BirtViewResolver();
bvr.setBirtEngine(this.engine().getObject());
bvr.setViewClass(HtmlSingleFormatBirtView.class);
bvr.setDataSource(this.birtDataServiceConfiguration.dataSource());
bvr.setReportsDirectory("Reports");
bvr.setOrder(2);
return bvr;
}


I tried this but couldn't figure out how to set birtEngine, viewClass, and dataSource part



<beans:bean id="birtViewResolver" class="org.eclipse.birt.spring.core.BirtViewResolver">
<beans:property name="birtEngine" value="?" />
<beans:property name="viewClass" value="?" />
<beans:property name="dataSource" value="?" />
<beans:property name="reportsDirectory" value="Reports" />
<beans:property name="order" value="2" />
</beans:bean>


Thank you in advance


No comments:

Post a Comment