eclipse code formatting

window-->preferences-->java-->codestyle There are two options formatter and clean up under it

Formatter is mainly to set formats such as newlines, indents, spaces, etc.

clean up automation format code

Yesterday, the code review said that it was not very standardized. Just apply the relevant cleanup and formatter files in the import project.

 

 

ctrl+shift+f canonical code

ctrl+shift+o add missing import remove redundant import

Both in cleanup source shift+alt+s

 

 

 

Method comment enter /** and press enter

 

Log objects are generally private static final Logger log = LoggerFactory.getlog(this.getclass());//Error using this in a static context

So the parameter should be MyClass.class

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326739237&siteId=291194637