微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

java – 使用带有oauth2的spring cloud gateway

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跟踪它

原文地址:https://www.jb51.cc/spring/432413.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐