我们如何从Spring Boot应用程序中排除嵌入式Tomcat服务器,以便可以在JBoss Server上运行该jar?
您可以在pom文件中排除:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<artifactId>tomcat-embed-el</artifactId>
<groupId>org.apache.tomcat.embed</groupId>
</exclusion>
<exclusion>
<artifactId>tomcat-embed-core</artifactId>
<groupId>org.apache.tomcat.embed</groupId>
</exclusion>
<exclusion>
<artifactId>tomcat-embed-websocket</artifactId>
<groupId>org.apache.tomcat.embed</groupId>
</exclusion>
</exclusions>
</dependency>
Run Code Online (Sandbox Code Playgroud)
您可以通过链接查看此屏幕截图
小智 6
您可以按如下方式修改 POM.xml 文件:
<!-- Removing the dependency for the embedded tomcat -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
11673 次 |
| 最近记录: |