没有任何数据可供显示
开源项目社区 | 当前位置 : |
|
www.trustie.net/open_source_projects | 主页 > 开源项目社区 > saury |
saury
|
0 | 0 | 0 |
贡献者 | 讨论 | 代码提交 |
introduceThis is a xmlGenerator denpends on dom4j in order to generate any config xml file by runtime relations of objects.
usagee.g. Maybe you have a entity pojo like this
@BusinessEntity //this annotation specify this is a entitybean which should be parse
public class Person {
private String name;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
Then you can use saury like this
Person p = new Person(); p.setName="saury"; BeanParser bp = new BeanParser("src/idconfig.properties");
//idconfig is any properties file that you specify.
SpringXMLGenerator sg = new SpringXMLGenerator(); sg.setBeanParser(bp); String sid=sg.creatFile(p, "person.xml");
Now you can get a xml file like this in fact it's a spring config file
<?xml version="1.0" encoding="UTF-8"?>
Unknown end tag for
You can put any composite javabean contains any elements for example array collections map or annother javabean make SpringXMLGenerator receive a spring xml config file or just update a xml file.
Who should use it? Maybe you have already guessed If you offer a GUI ,saury will make more users easliy modify config file So you software is just some compoments .Users can custom any servise what he is interested in and everybody will have his owner software.
Is it intresting? if that, please join us!