IntelliJ IDEA中修改Servlet的模板
1.需求:
由于每次创建Servlet类的时候,我们都要重写下面两个方法,为了简化书写,可以在IDEA中修改Servlet的模板。
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
this.doPost(request,response);
}
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
//代码块
}
2.修改步骤
(1)打开 Setting
(2)Editor------->File and Code Templates
(3)