国产成人精品亚洲777人妖,欧美日韩精品一区视频,最新亚洲国产,国产乱码精品一区二区亚洲

您的位置:首頁(yè)技術(shù)文章
文章詳情頁(yè)

IDEA Servlet 模板設(shè)置的方法

瀏覽:198日期:2024-08-30 15:56:17

IDEA Servlet 模板

1. 打開(kāi)模板設(shè)置

IDEA Servlet 模板設(shè)置的方法

2. 替換模板內(nèi)容

#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != '')package ${PACKAGE_NAME};#end#parse('File Header.java')@javax.servlet.annotation.WebServlet('/${Class_Name}')public class ${Class_Name} extends javax.servlet.http.HttpServlet { protected void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException { this.doPost(request,response); } protected void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException { }}

3. 新建 Servlet

IDEA Servlet 模板設(shè)置的方法

4. 效果輸入類名即可自動(dòng)創(chuàng)建 Servlet 文件:

import javax.servlet.ServletException;import javax.servlet.annotation.WebServlet;import javax.servlet.http.HttpServlet;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpServletResponse;import java.io.IOException;@WebServlet('/Servlet')public class Servlet extends HttpServlet { protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { this.doPost(request, response); } protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { }}

總結(jié)

到此這篇關(guān)于IDEA Servlet 模板設(shè)置的方法的文章就介紹到這了,更多相關(guān)IDEA Servlet 模板設(shè)置內(nèi)容請(qǐng)搜索好吧啦網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持好吧啦網(wǎng)!

標(biāo)簽: IDEA
相關(guān)文章:
主站蜘蛛池模板: 天全县| 普兰县| 长顺县| 桑日县| 扶风县| 牡丹江市| 金秀| 青铜峡市| 乐山市| 邢台县| 成安县| 孙吴县| 西峡县| 德昌县| 嵩明县| 东光县| 四子王旗| 英吉沙县| 城步| 晋城| 巨野县| 揭阳市| 商丘市| 读书| 靖安县| 习水县| 内黄县| 临桂县| 壶关县| 秭归县| 清丰县| 石渠县| 天全县| 蓬安县| 大同市| 始兴县| 通辽市| 孝感市| 新兴县| 平安县| 齐齐哈尔市|