Http://www.oschina.net/question/185178_112783? Sort = Time
Purpose: To migrate a digital project to Linux.
Problems:
1. The database is an SQL Server and needs to be transformed into MySQL.
2. Test in Linux.
3. The newly added functions, such as extracting the APK and compressing the signature, are executed in a DOS batch. How can this problem be solved after migration?
Huang Hai's solution:
Take two steps.
1. Upgrade 151 of the database from SQL Server 2000 to SQL Server 2008. The main reason is that it is very convenient to write paging functions using 2008, which will speed up modification, at the same time, only one school currently uses SQL Server 2000 during subordinate installation. After one month, we have completed the mysql version and can directly replace it. Therefore, it is very important to migrate the database without upgrading, the paging extraction problem will occur during the modification process.
After using SQL 2008, the paging method reference: http://www.jb51.net/article/35269.htm
2. Change SSI to SS and remove ibatis. Jdbctemplate support has been added to the digital project. Example:
G: \ work \ digitalcampus \ sys \ com \ dsideal \ sys \ action \ sysloginpersonaction. Java
Private jdbctemplate = (jdbctemplate) springutil. getbean ("jdbctemplate"); Public String login () throws exception {// The following example shows how to use jdbctemplate string SQL = "select count (1) In each layer) from t_sys_loginperson where user_id = 9 and B _use = 1 "; int COUNT = This. jdbctemplate. queryforint (SQL); // system. out. println (count );
Why is there a dbutil toolkit in this project, and we have integrated jdbctemplate? Cause: 1. We are more familiar with jdbctemplate. 2. jdbctemplate supports parameterization. I have read that dbutil does not support SQL parameters and can only splice SQL statements.
3. Remove ibatis. We will perform step-by-step checks on the action and service impl layers. If we find that there are SQL statements that call ibatis, we will use jdbctemplate to rewrite them. Until all SQL statements are modified.For classes and functions that are not used now, delete them with no dead corners.
4. After the modification is complete, Ms sqlserver is equivalent to storing a bunch of tables in it, and stored procedures, functions, and triggers are not allowed, in addition, the normal development of the current project is not delayed, that is, the development can be continued at any time during the modification process, and the project can be produced at any time.
5. After all ibatis are removed, the first round ends.
6. In the second round, we quickly changed all paging codes to MySQL pages. It's just the process of modifying to limit, and it should be very fast.
7. All modifications are successfully completed.
8. Related project modification work. For example, the automatic update package also needs to be migrated to MySQL, and the installation package also needs to be modified.
Modification time:
Modified by: Zhou Feng, Wu Yu, Huang Hai
Specific Task Arrangement:
1. Zhou Feng: Go to the system as a background administrator and follow the Web process step by step to complete all SQL modifications.
2. Wu Yu: sort out the interfaces with the enhanced edition, Standard Edition, and office, and modify them one by one to remove all unnecessary classes and methods.