Because we use ibatis for persistence, We need to write a lot of XML code.
No need to generate toolsWhich affects the development efficiency more or less;
Especially when there are many fields in the table, the ing between the writing section and bean attributes is time-consuming, and troubleshooting is very troublesome;
I personally think that the ibatis configuration file is still relatively controllable, and the code is also quite nice. It can reduce a lot of junk code. As long as we make proper use of some gadgets, the development efficiency will also be very high!
Solution:ExcelDatabase Table Structure DesignSchema + ultraeditColumn Block Mode
You can also use the XML Special Editor xmlspy to replace the ultraedit column block mode.
1) first copy n rows in UE (the specific number of rows can be controlled by itself, generally the same as the number of fields in the table) the same ing code is shown in <result property = "" column = "" javatype = "" jdbctype = ""/>;
AndEnable the column Block Mode;
2) copy from Excel SchemaField ColumnAnd paste it to the property and column columns in the UE;
3) copy from Excel SchemaField Type ColumnAnd paste it to the jdbctype column in the UE;
4) Fill in the javatype field according to the jdbctype field. Here, you can use the UE search and replacement function to complete it;
5) disable the column Block Mode in ue, copy the completed ing code back to eclipse, and complete all mappings;
This ensures that our ing relationships are exactly the same as those in our schema design, and it is very convenient when troubleshooting;
In addition, insert and update operations can be completed in a similar way;