IntelliJ IDEA 2020 創建xml文件

在這裏插入圖片描述
1、file—setting,左上角輸入template
2、在左側欄找到File And Code Templates
3、中間選中Files
4、點擊+號,添加模板
5、輸入模板名字:Name:mybatis-cfg.xml (name可以自定義)
6、後綴名extension:xml
7、在面板中間輸入內容:

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE configuration
        PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>

</configuration>

8、把enable live Template(激活模板)勾選上
9、點擊Apply—ok
10、選中模板,然後輸入xml文件名字mybatis.cfg.xml
在這裏插入圖片描述
在這裏插入圖片描述
在這裏插入圖片描述

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章