spring-beans-writer配置文件生成器
spring-beans-writer用来生成spring IOC的配置文件,可以自动写入简单类型以及List、Map等复杂类型的值。
示例如下:
SpringBeans beans = new SpringBeans(); beans.addBean(_database, "database"); beans.addBeans(_persons); SpringBeansWriter sbw = new SpringBeansWriter(); List<FilteredOutput> outputs = new ArrayList<FilteredOutput>(); outputs.add(new SimpleFilteredOutput(new File("spring_beans.xml"))); sbw.write(beans, outputs);
评论