Skip to content

Commit 9a514ca

Browse files
committed
fix: gateway 去除 tomcat 依赖
1 parent 7dceebf commit 9a514ca

2 files changed

Lines changed: 10 additions & 14 deletions

File tree

gateway/pom.xml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
<artifactId>uni-boot-gateway</artifactId>
1515
<description>流量网关</description>
1616

17+
<properties>
18+
<servlet-api.version>2.5</servlet-api.version>
19+
</properties>
20+
1721
<dependencies>
1822
<!--cloud-->
1923
<dependency>
@@ -52,12 +56,6 @@
5256
<groupId>org.springframework.boot</groupId>
5357
<artifactId>spring-boot-configuration-processor</artifactId>
5458
</dependency>
55-
<!--tomcat-->
56-
<dependency>
57-
<groupId>org.springframework.boot</groupId>
58-
<artifactId>spring-boot-starter-tomcat</artifactId>
59-
<scope>provided</scope>
60-
</dependency>
6159
<!--test-->
6260
<dependency>
6361
<groupId>org.springframework.boot</groupId>
@@ -74,6 +72,11 @@
7472
<groupId>com.github.xiaoymin</groupId>
7573
<artifactId>knife4j-spring-boot-starter</artifactId>
7674
</dependency>
75+
<dependency>
76+
<groupId>javax.servlet</groupId>
77+
<artifactId>servlet-api</artifactId>
78+
<version>${servlet-api.version}</version>
79+
</dependency>
7780

7881
<dependency>
7982
<groupId>com.github.cadecode</groupId>

gateway/src/main/java/com/github/cadecode/uniboot/gateway/UniGatewayApplication.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
import com.github.cadecode.uniboot.common.core.extension.strategy.StrategyService;
44
import org.springframework.boot.SpringApplication;
55
import org.springframework.boot.autoconfigure.SpringBootApplication;
6-
import org.springframework.boot.builder.SpringApplicationBuilder;
7-
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
86
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
97
import org.springframework.cloud.openfeign.EnableFeignClients;
108
import org.springframework.context.annotation.EnableAspectJAutoProxy;
@@ -18,14 +16,9 @@
1816
@EnableDiscoveryClient
1917
@EnableAspectJAutoProxy(exposeProxy = true)
2018
@SpringBootApplication
21-
public class UniGatewayApplication extends SpringBootServletInitializer {
19+
public class UniGatewayApplication {
2220

2321
public static void main(String[] args) {
2422
SpringApplication.run(UniGatewayApplication.class, args);
2523
}
26-
27-
@Override
28-
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
29-
return application.sources(UniGatewayApplication.class);
30-
}
3124
}

0 commit comments

Comments
 (0)