首先放xml下载地址 https://share.weiyun.com/5i2UH8H (密码:Zk6g)

废话不多说 直接上图

.设置XML格式化模板

java文件,打开eclipse-->window--->preferences--->java-->Code Style-->Formater”,选择写好的模板.xml文件导入即可。

Eclipse保存代码自动格式化

.设置保存时自动格式化代码

        打开eclipse,选择 window-->Preferences-->JAVA-->Editor-->Save Actions。右边选中:Perform the selected actions on saveFormat source codeFormat all linesOrganize imports,保存后重启eclipse即可看到效果,操作步骤看下图:Eclipse保存代码自动格式化

ojbk完事!!!! 

相关文章:

  • 2022-01-16
  • 2021-12-24
  • 2021-10-12
  • 2022-12-23
  • 2022-12-23
  • 2021-06-12
  • 2021-07-13
猜你喜欢
  • 2021-04-30
  • 2021-05-11
  • 2021-05-01
  • 2021-10-24
  • 2021-05-23
  • 2021-08-22
相关资源
相似解决方案