快捷鍵 ALT + SHIFT +J
效果如下圖
package com.itheima.servlet.demo1;
import javax.servlet.Servlet;
/**
* author:gabriel_wei
* date:2020年3月9日
* project name:web01
*/
public class ServletDemo1 implements Servlet{
}
下面的內容轉子https://blog.csdn.net/Ren_gw/article/details/84565888
- 點擊Comments下的Files可對整個Java文件進行註釋:包括公司名稱,版權所屬,作者信息,日期等。
/**
-
Title: ${file_name}
-
Description:
-
Company: icss.207.class
- @author ${user}
- @date ${date}
- @version 1.0
*/
- 點擊Types對類進行註釋:
/**
- @Title: ${type_name}
- @Description:
- @author ${user}
- ${tags}
- @createTime {time}
*/
-
點擊Fields對字段進行註釋:
/** ${field}*/ -
點擊Constructors對構造方法進行註釋:
/**
-
Title:
-
Description:
- ${tags}
*/
- 點擊Methods對方法進行註釋:
/**
- @Title: ${enclosing_method}
- @Description:
- @author ${user}
- ${tags}
- @date {time}
*/
- 點擊Overriding Methods對重寫方法進行註釋:
/* (non-Javadoc)
-
Title: ${enclosing_method}
-
Description:
- ${tags}
- ${see_to_overridden}
*/
- Delegate methods對代表方法進行註釋:
/**
- ${tags}
- ${see_to_target}
*/
Code–> Catch
${exception_var}.printStackTrace();