java – 使用带有oauth2的spring cloud gateway

前端之家收集整理的这篇文章主要介绍了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.f2er.com/spring/432413.html

猜你在找的Spring相关文章