ServerRequest on SpringBoot 2.0.0.RELEASE



我最近移动了我的应用。从Spring Boot 1到Spring Boot 2(2.0.0.Release(。

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.0.0.RELEASE</version>
    <relativePath/> <!-- lookup parent from repository -->
</parent>

我想导入类org.springframework.web.reactive.function.server.ServerRequest以从接口获取错误属性

org.springframework.boot.web.reactive.error.ErrorAttributes;

但是我有一个错误:

The import org.springframework.web.reactive.function.server.ServerRequest cannot be resolved

Spring Boot反应性项目spring-boot-web-reactive与Spring 5.0

合并到Spring Webflux中

请确保您的类路径上有webflux入门器:

<dependency>
     <groupId>org.springframework</groupId>
     <artifactId>spring-webflux</artifactId>
</dependency>

相关内容

最新更新