我正在尝试将注释添加到我的代码中。当我高亮显示一个函数并按下Alt-Shift-J时,它只添加了三行空白注释:
/** * */ protected void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException { System.out.println("In Gateway doGet..."); this.doRequest("GET", request, response); }
注意-这是我的首选项的屏幕截图:
“${tags}没有任何作用,但我为“Title”添加了一个字符串,它仍然没有任何作用。有人能帮我吗?
我想你是在延长 HttpServletRequest 自从你 doGet 方法是在那里定义的,因此您正在重写该方法。
HttpServletRequest
doGet
由于您正在重写一个方法,因此需要选择 Overriding methods 在该菜单中,然后输入您的评论:
Overriding methods
之后,Eclipse将填充注释。