Maven设置pom文件坐标时,自动写入模板坐标
1、点击File/Settings,打开设置。搜索live --> 点击live Templates
2、点击 + 号创建一个新的分组,输入名字cumtom点击OK
3、完成上诉步骤后,选中新建的分组cumtom 再点击 + 号,设置模板
eg:在Template text中设置如下代码
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<port>8888</port>
</configuration>
</plugin>
4、点击Define设置在什么文件下使用该模板[这里可以选中XML];设置完成点击ok,之后即可在pom文件中直接输入tomcat7就能快速写出设置号的模板
评论 (0)