[1,1] illegal character: '\ufeff' [1,10] class, interface, or enum expected
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10.669 s
[INFO] Finished at: 2019-04-22T15:10:15+08:00
[INFO] Final Memory: 39M/220M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile) on project taotao-manager-web: Compilation failure: Compilation failure:
[ERROR] /D:/taotao/taotao-manager/taotao-manager-web/src/main/java/com/taotao/controller/ItemController.java:[1,1] illegal character: '\ufeff'
[ERROR] /D:/taotao/taotao-manager/taotao-manager-web/src/main/java/com/taotao/controller/ItemController.java:[1,10] class, interface, or enum expected
[ERROR] -> [Help 1]
每新建一个class文件,在编译时都报些错误,知道乱码?可怎么处理呢!
原来是自己不小心在修改 settings 配置时,选错。
按:Ctl + Alt + s -》 Editor > File Encodings > BOM for new UTF-8 files
Create UTF-8 files: with NO BOM > OK