由于我的项目是Maven构建的,所以在项目依赖配置文件pom.xml上加入构建项目编码属性:
<properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties>
完美解决