Enterprise information system plays a crucial role in business management. But in the development process of enterprise information systems, there are still many issues such as low efficiency, inconsistent system architecture, long development cycle and so on. A code generation tool based on J2EE architecture was designed to solve these problems. With the tool, system developers only need to design models in the visual designer and the tool will complete the code generation. At present, the code generation tool has been applied to the actual software development platform. Practice shows that the use of the code generation tool can unify systems architecture, reduce the development of repetitive code, reuse and share the design, improve the quality and efficiency of enterprise information system development.