2021
02-27
02-27
Spring Boot如何移除内嵌Tomcat,使用非web方式启动
前言:当我们使用SpringBoot编写了一个批处理应用程序,该程序只是用于后台跑批数据,此时不需要内嵌的tomcat,简化启动方式使用非web方式启动项目,步骤如下: 1、修改pom.xml文件在pom.xml文件中去除内嵌tomcat,添加servlet依赖<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId><exclusions><!--去除内嵌tomcat--><exclusio...
继续阅读 >