IDEA使用Maven的Tomcat7插件运行项目 首先在插件商店安装 Maven Helper <build> <plugins> <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <version>2.2</version> <configuration> <path>/</path> <port>80</port> <uriEncoding>UTF-8</uriEncoding> ...
使用了这个插件就不需要配置tomcat了,直接用maven去run就行 配置方法:pom里添加:(之所以用tomcat7是因为如果直接用依赖下载很难下载到tomcat8-maven-plugin,详情看Maven使用tomcat8-maven-plugin插件) <build><finalName>processdata</finalName><plugins><!--配置Tomcat插件--><plugin><groupId>org.apache.tomcat.mav...
vintage</groupId> <artifactId>junit-vintage-engine</artifactId> </exclusion> </exclusions> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> </plugins> </build> </project> ...
1、去tomcat 官⽹下载 tomcat 8 tar.gz ⽂件,然后解压.2、idea中,配置启动 3、gradle or maven 配置 <packaging>war</packaging> or apply plugin: "war"4、增加tomcat启动调⽤spring boot初始化⼊⼝:public class ServletInitializer extends SpringBootServletInitializer { private Logger logger = ...
<plugin> <!-- 配置插件 --> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <configuration> <port>90</port> <path>/</path> </configuration> </plugin> </plugins> </pluginManagement> </build> ...