When you write Java code using Eclipse, the automatically generated comment information is generated in a pre-set format.
Modify author, date comment format: Open windows->preferences->java->code style->code Templates, click Comments in the right window, you can see a lot of options, We can edit this comment information template.
If we want to set the author information and date information at the beginning of a Java file.
Select types, click Edit, and
/**
* @author ${user}
* ${tags}
*/
Delete the ${user}, change it to the name you want to display, delete ${tags}, click Insert Variable, select Date, and the date information will be generated automatically. When you need to add a comment, click Sources->ganarate Element Comment, or use the shortcut key Alt+shift+j, Eclipse automatically adds a comment before the class.
The specification for annotations is as follows:
File Comment Tags:
/**
* <p>title: ${file_name}</p>
* <p>description: </p>
* <p>copyright:copyright (c) 2007</p>
* <p>Company:LTGames</p>
* @author LINRZ
* @date ${date}
* @version 1.0
*/
Eclipse automatically generates feature settings such as author, date comment, and more