Story background
The former, which was discussed in the Flight Survey Group (283440449), synchronously writes the JTL file data of the aggregated report to the database. Specific benefits, we can diverge.
In addition to the previous experience of the revision of the source code, the solution to the idea, generally or from the source. Solving Ideas
1. Locate the Java file that writes the JTL file data.
2, write the JTL data at the same time, write MySQL database. Hands-on Practice 1 Find the location to write to JTL.
Roughly turned the table of contents, turned over here, and in the Resultcollector.java file, search the "JTL" keyword.
2 then looked at the approximate method.
Discover that the following method should be the method we want to change. (Sorry, put my debugging code in ...) )
3 View csvsaveservice.resulttodelimitedstring () method
In the method body, it means that all fields of the requested result are spliced together to return a string. 4 back to Resultcollector.java file
At this time we are
String savee = csvsaveservice.resulttodelimitedstring (event);
After this code, do two things:
1. Truncate the string
2. Write to MySQL Database
Modify the code as shown:
Need to write code and screenshots here is not on, not difficult. (Need to modify the class file and source code, the following will be uploaded to the flight test QQ Group)