1.如果是使用的spring-boot-starter-web依赖,其tomcat是内置的,启动运行的时候不需要额外配置tomcat

2.如果使用了配置插件的方式,这样还是要配置一个maven版的configurations配置,配置参数就是

tomcat7:run ,要不然就只有去控制台手动tomcat:run了
 <build>
        <plugins>
            <plugin>
                <groupId>org.apache.tomcat.maven</groupId>
                <artifactId>tomcat7-maven-plugin</artifactId>
                <version>2.2</version>
                <configuration>
                    <port>9000</port>
                    <!-- 请求路径 -->
                    <path>/</path>
                </configuration>
            </plugin>
        </plugins>
    </build>

3.使用导入jar包的方式开发的servlet类型,需要去下载一个tomcat,手动配置idea里面的运行配置,每启动一个项目就需要一个tomcat,也就是说要准备多份tomcat

只是把最近手头经过的项目总结一遍,如有不对请指正

Logo

一站式 AI 云服务平台

更多推荐