方式1: 1. 在工具栏绿色小锤子旁边选择Edit Configuration 2. 加号下拉框选择local tomcat server进行配置即可 方式2: pom.xml中添加Tomcat插件坐标