V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
• 请不要在回答技术问题时复制粘贴 AI 生成的内容
PeiXyJ
V2EX  ›  程序员

Spring Cloud Gateway 和 Spring Cloud Oauth2 提示 Filter 错误

  •  
  •   PeiXyJ · Nov 16, 2020 · 2806 views
    This topic created in 1991 days ago, the information mentioned may be changed or developed.

    我想使用 Spring cloud gateway 整合 Oauth2,但是发现启动的时候提示

    java: 无法访问 javax.servlet.Filter
    找不到 javax.servlet.Filter 的类文件
    

    然后我 Maven 添加了 javax.servlet.Filter但是发现 gateway 使用的spring-boot-starter-webflux会和这个Filter冲突.

    各位大佬是怎么处理整合这两个组件的?

    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-oauth2</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-gateway</artifactId>
    </dependency>
    
    4 replies    2020-11-16 18:27:41 +08:00
    buliugu
        1
    buliugu  
       Nov 16, 2020
    xuanbg
        2
    xuanbg  
       Nov 16, 2020
    这两个东西整合不到一块去的
    tommyzhang
        3
    tommyzhang  
       Nov 16, 2020
    gateway 不是基于 servlet 的 估计需要你自己集成了
    zm8m93Q1e5otOC69
        4
    zm8m93Q1e5otOC69  
       Nov 16, 2020 via Android
    整不到一块,用 servlet 可以用 zuul
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   819 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 51ms · UTC 21:06 · PVG 05:06 · LAX 14:06 · JFK 17:06
    ♥ Do have faith in what you're doing.