Abstract:According to the order and dependencies of data initialization for Java EE application, a data initialization method based on design pattern is proposed. First, the data to be initialized is regarded as a complex object, and it is represented by the product role of the builder mode, using the abstract builder role to define the order of data initialization, and using Hibernate framework to save every part of the data to the database. Then, it defines the initialization algorithm in the application development stage and the formal operation stage through the strategy pattern. Finally, it uses singleton pattern to encapsulate the general steps of JDBC and Hibernate operation. Taking the data initialization operation of target assessment management system in colleges and universities for example, through reading the initial data stored in the Excel file by JXL as the implementation logic of the concrete builder's role, the concrete realization process of the method is described in detail. The test and practice show that the data initialization method can meet the application requirements of the system, it has high reusability and can improve the expansibility and maintainability of data initialization operation.