利用软件复用技术可以大大提高软件的生产效率,有效的减轻开发者的负担。代码自动生成是软件复用常用的一种技术手段。在SSH框架的基础上,研究了控制层的代码,从hibernate生成的javaBean数据对象入手,利用模板生成技术和配置树的层次方法,自动化生成控制层的代码,利用eclipse 的SWT 技术做可视化界面,实现了一个原型系统,并测试了该系统。
It will improve production rate and release developer’s burden by using software reusing technology. Automatic code generation is one of most commonly used methods. Based on SSH framework, this paper studied its control layer. After studying the javabean data which generated by hibernate, this paper auto-generated the control layer codes by using Model generated technology and config tree method. Producing a Demo System and testing it . the Demo System provide a friendly interface based on SWT framework.