1.创建一个Project
2.
3.
4.这里在Properties中添加一个参数archetypeCatalog=internal
,不加这个参数,在maven生成骨架的时候将会非常慢,有时候会直接卡住。
5.
6.配置Tomcat,点击右上角的 Edit Congihurations
7.点击左上角的加号,选择Maven
8.修改名字和Conmmand line
9.先在pom.xml中加入tomcat7的插件(注意我在其中的port标签里设置了端口号是9090)
然后点击右上角的绿色三角形箭头,等待tomcat启动,可以在下方看到tomcat的启动信息。(如果是第一次启动,可能要等待从Maven仓库下载插件)
10.tomcat启动成功后,在浏览器输入localhost:9090