The code downloaded by Maven is garbled

When downloading the source code through maven and browsing the source code directly through eclipse, it is found that the Chinese comments are garbled. In fact, the problem caused by the default encoding of eclipse. It can be solved by the following methods:

    1. Modify the default encoding of text files in Eclipse: windows->Preferences->general->Workspace->Text file encoding is set to UTF-8.


    2. Modify the default encoding of the JAVA source file: windows->Preferences->general->Content Types->Context Types tree on the right, click on Text, select Java Source File, and enter UTF-8 in the Default encoding input box below , click Update.

 

    3. Just restart Eclipse.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327062205&siteId=291194637