一、配置编译环境
选择菜单栏Build下方的Edit configurations,打开如下界面:
![](https://img.haomeiwen.com/i9261625/9ccb539e5f50e3fe.png)
点击"+"号,选择Application。在configuration选项卡选择入口类Main class。
在pom.xml文件中配置依赖包tomcat:spring-boot-starter-tomcat
二、用MAVEN打包
1.在pom.xml中配置maven包:maven-jar-plugin、maven-compiler-plugin
2.通过idea执行maven package:
![](https://img.haomeiwen.com/i9261625/963b6b3413611368.png)
![](https://img.haomeiwen.com/i9261625/545579cceb278596.png)
网友评论