点击 File --> Settings --> Editor --> File and Code Templates

1、点击 “+” ,添加模板;

2、填入模板名和后缀名;

3、填入模板代码

4、勾选 Enable live Template(**模板)

IDEA 中创建 XML 模板

相关文章: