【发布时间】:2019-08-22 13:44:10
【问题描述】:
我正在使用带有 webflux 的 spring boot 并从 starter web 中删除了嵌入式 tomcat 依赖项,我想为我的应用程序添加基本上下文路径,有什么办法吗?我需要这个,因为我在 kubernetes 集群后面有 ingrees 属性,并且重定向是基于上下文路径进行的。
<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>
【问题讨论】:
-
你可以找到你的答案here
-
@Mạnh Quyết Nguyễn,我在发布问题之前尝试了同样的方法,但没有运气:(
标签: java spring-boot netty spring-webflux