使用maven使用组件打包后,直接通过eclipse浏览源代码时,发现中文注释为乱码的问题。其实这个eclipse默认编码造成的问题。可以通过以下方法解决:

  •  修改Eclipse中文本文件的默认编码:windows->Preferences->general->Workspace->Text file encoding设置为UTF-8
  •  修改JAVA源文件的默认编码:windows->Preferences->general->Content Types->右侧Context Types树,点开Text,选择Java Source File,在下面的Default encoding输入框中输入UTF-8,点Update

相关文章:

  • 2021-12-04
  • 2021-12-29
  • 2022-12-23
  • 2022-01-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-19
猜你喜欢
  • 2021-05-10
  • 2021-10-04
  • 2021-05-26
  • 2021-04-02
相关资源
相似解决方案