修改方法:进入File–>Settings–>Editor–>Code Style–>Java,修改Code Generation 去掉Line comment at first column前的对勾,选中Add a space at comment start,选中第二个是为了让//和注释中间加一个空格,然后点击Apply即可
2、配置文件注释:
File–>Settings–>Editor–>Code Style–>XML,去掉Line comment at first column前的对勾
1、IDEA单行注释默认是在首位置;修改方法:进入File–>Settings–>Editor–>Code Style–>Java,修改Code Generation去掉Line comment at first column前的对勾,选中Add a space at comment start,选中第二个是为了让//和注释中间加一个空格,然后点击Apply即可2、配置文件注释:File–>Settings–>Editor–>Code Style–>