Let the architect call you

  A day's work is still very compact, but it just feels inefficient. Among them, in the process of commenting code and adding jvm parameters, I seem to be careless. For example, in the process of restoring the commented code, the selected area is incorrect. In the process of adding jvm parameters, redundant content was copied. This matter was originally very simple and would not make mistakes, but I still did not do well. At least this error can be found and corrected in two places, one is when copying, the other is when pasting, and I didn't take a glance at myself, indicating that I really should have a snack.

  Then in the afternoon, it was very tight from the line. But the test said there are still problems. I went to see the logs, there are very few logs, basically see where the problem is. Check the code yourself, and do not know where the code appears. Then you can only add some logs. Let the test be reissued. Then I saw the parameters passed behind. I copied the parameters and then called them locally, but I originally wanted to change the deployment, because the local configuration environment is more troublesome. But a colleague of developers joked that I would deploy again. So my psychology is really uncomfortable. I should try my best to succeed at once and make good adjustments locally, so as not to cause problems. The environment is complex and must be matched, just this does not involve database operations, not the yellow zone. Then I debugged locally and found many problems. For example, compression problems, decompressing files, file paths and other problems, if you do not adjust it yourself, it will take a long time to solve.

  Then I was in a hurry, and my thoughts were chaotic. I found the problem by repeated debugging and then solved it. The written code is also very bloated. For this, I just want to say that it is already very good to express the business correctly. Although I also want to write the business more elegantly, it is really difficult and there is a process.

  When writing your own code, many basic operations are not.

// 
ZipEntry zipEntry  


ZipOutputStream
String name = zipEntry.getName (); // This is the name of the compressed file


File [] files = file.listFiles (); // return all files in the folder.

// 
Compressed file stream and ordinary file stream:
Ordinary file streams can be used directly, but compressed file streams still need to be decompressed before they can be used. Just like video data, it is compressed during transmission. 

// ResponseEntity <Reource> res = restTemplate.getEntity (); // Practice file transfer locally. This is a good data transmission interface agreed by both parties.

  

 

Guess you like

Origin www.cnblogs.com/Robin008/p/12676738.html