MAVEN project packaging compilation log garbled

Many times when IDEA uses maven to package and compile, the problem is garbled, which is very inconvenient for us to troubleshoot the problem, as follows:

The solution is very simple, you only need to set the character set of the maven compiled code in IDEA;

Click in turn: File---Settings---Search Runner---Set VM Options parameters---Apply---Complete

-Dfile.encoding=GB2312

After setting effect:

Note: This operation is limited to solving the problem of garbled logs during packaging; after the problem is solved according to the error log and the packaging is normal, it is recommended to change the encoding format to utf-8. Otherwise, there will be Chinese garbled characters in the packaged project!

If helpful, welcome to like and favorite (#^.^#)

Guess you like

Origin blog.csdn.net/idto315/article/details/123065552