SentralLiu

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

 1、在工具主窗口选择File-->settings

2、选择Editor-->File and Code Templates

3、在右边的窗口点击“+”新建模板文件

4、依次填写Name(名称)   Extension(后缀名)

5、添加主体内容,新建文件自带

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
         version="4.0">
	<!-- 这是一个空白的web.xml文件模板 -->
</web-app>

6、勾选Enable live Template激活标签

7、点击应用,确定即可

 看,模板出现在新建文件的列表中了

posted on 2021-12-19 11:09  SentralLiu  阅读(394)  评论(0)    收藏  举报