File encoding has not been set, using platform encoding GBK, i.e. build is platform dependent

Problem: Compile and package (mvn clean install) files are always in GBK format, not UTF-8 format

Cause Analysis: The default encoding format GBK is used

Solution: Add configuration to the pom file

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

Results of the:

Guess you like

Origin blog.csdn.net/weixin_38023225/article/details/113136237