加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

java – 使用带有oauth2的spring cloud gateway

发布时间:2020-12-15 01:33:44 所属栏目:大数据 来源:网络整理
导读:i face a problem when i using spring cloud gateway is if any dependency call spring-boot-starter-tomcat directly or recursively it will not work because it will start the embedded tomcat server not the netty server that spring cloud gatewa

i face a problem when i using spring cloud gateway

is if any dependency call spring-boot-starter-tomcat directly or recursively

it will not work because it will start the embedded tomcat server not the netty server that spring cloud gateway use

我开始通过排除这种依赖性来解决这个问题

        

the spring cloud gateway worked successfully

but sometimes i want to use spring-cloud-starter-oauth2 to use @EnableOAuth2Sso

我开始使用

    

at that time i face the big issue that throw exception saying

Caused by: java.lang.IllegalStateException: Failed to introspect annotated methods on class org.springframework.security.oauth2.config.annotation.web.configuration.OAuth2ClientConfiguration
……

Caused by: java.lang.NoClassDefFoundError: javax/servlet/Filter

最佳答案
正如您所见,Spring云网关使用反应模型,而不是基于netty而不是tomcat.反应性变化是一个重大转变,目前Spring Security不支持,但工作正在进行中,您可以在https://github.com/spring-cloud/spring-cloud-gateway/issues/179跟踪它

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读