代码之家  ›  专栏  ›  技术社区  ›  en Peris

SpringBoot 2.0.0上的ServerRequest。发布

  •  0
  • en Peris  · 技术社区  · 7 年前

    我最近移动了我的应用程序。从弹簧护套1到弹簧护套2(2.0.0释放)。

    <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
    
    1 回复  |  直到 7 年前
        1
  •  3
  •   phisch    7 年前

    Spring Boot反应式项目 spring-boot-web-reactive 已合并到 Spring Webflux 带弹簧5.0

    确保你有 webflux 类路径上的初学者:

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