spring-webflux 引起了很多问题

如果对spring-webflux 不是特别熟悉,或者不是从Spring MVC 迁移,纯粹新的spring-webflux 项目,奉劝大家谨慎使用。

前端请求 404问题

spring.main.web-application-type=reactive

前置拦截器失效问题

这个问题好久没解决,我只好退回到Spring MVC,移除了spring-webflux依赖,原项目正常了,先记这么多,之后能解决再记录解决方案

当你的代码中出现 "Spring Webflux is missing from the classpath, which is required for Spring Cloud Gateway at this time. Please add spring-boot-starter-webflux dependency" 这个错误信息时,这意味着你的项目缺少了Spring Webflux依赖。 为了解决这个问题,你可以尝试以下两种方法: 方法一: 1. 添加对Spring Webflux依赖。你可以手动在你的项目的pom.xml文件中添加以下依赖: ``` <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-webflux</artifactId> <version>2.1.0.RELEASE</version> </dependency> ``` 这将会把Spring Webflux添加到你的项目中,并解决这个错误。 方法二: 1. 下载并添加所需的Jar包。你可以在引用中提到的链接中下载`springfox-spring-webflux-3.0.0.jar`和其他相关的Jar包。 2. 将下载的Jar包添加到你的项目的依赖中。具体的添加方式取决于你使用的构建工具(如Maven或Gradle)。 3. 重新构建你的项目,并确保这些Jar包已经正确地添加到了你的项目中。 通过以上两种方法之一,你应该能够解决 "spring-webflux 爆红" 的问题。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *3* [解决为什么导入网关gateway依赖爆红, 并且 gateway内置环境 与 spring-boot-starter-web 冲突问题](https://blog.csdn.net/y2020520/article/details/107829809)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] - *2* [springfox-spring-webflux-3.0.0-API文档-中英对照版.zip](https://download.csdn.net/download/qq_36462452/85274565)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值