-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gateway+oauth2 error #478
Comments
Please learn how to format code on GitHub. Can you provide a complete, minimal, verifiable sample that reproduces the problem? It should be available as a GitHub (or similar) project or attached to this issue as a zip file. Sounds like you might have |
Also |
@ryanjbaxter
Yes. I found spring-boot-starter-web on the classpath.Thank you for your reminding. |
Did the error go away after removing |
I have the same issue, I just made a small modification in spring-cloud-gateway-sample. only adding the following two dependencies for I need to support oauth (if I does not use gateway , my oauth works well).
then I added "@EnableOAuth2Sso" to main class. When I start my gateway project. it reports the following error: Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. APPLICATION FAILED TO START Description: Parameter 0 of method hystrixGatewayFilterFactory in org.springframework.cloud.gateway.config.GatewayAutoConfiguration$HystrixConfiguration required a bean of type 'org.springframework.web.reactive.DispatcherHandler' that could not be found. Action: Consider defining a bean of type 'org.springframework.web.reactive.DispatcherHandler' in your configuration. Process finished with exit code 1 If I remove the spring-boot-starter-web
when I started ,the error is like this
then I added javax.servlet-api dependeancy, the new error is like this.
Notes: Apprecate your help! |
Yes.But when I add the @ResourceServerConfig config,new error occurred when the service was started demo address(Branch:exclusion-spring-boot-starter-web): Bug report(error log):
|
@GAOFeipeng @yqbjtu like I said above support for spring cloud gateway has not yet been added to spring-cloud-security it is not surprising it doesnt work. |
@ryanjbaxter , Thank you! Spring Cloud gateway is very excelent project/product. Thank you for your contribution! |
Why are you closing this issue? What are the plans for supporting cloud gateway + oauth2 ? Im forced now to discard cloud gateway. :( |
@TinaRanic because there is already an issue open to add this support spring-attic/spring-cloud-security#141 |
I expect that the issue can be resolved one day. |
@wendrewshay No problem ,haha |
这个问题解决了吗?同一个问题。@yqbjtu |
Question:
An error occurred when the service was started
demo project address: gateway-oauth2
Bug report(error log):
2018-08-07 21:47:46.119 ERROR 732 --- [ost-startStop-1] o.s.b.web.embedded.tomcat.TomcatStarter : Error starting Tomcat context. Exception: org.springframework.beans.factory.BeanCreationException. Message: Error creating bean with name 'servletEndpointRegistrar' defined in class path resource [org/springframework/boot/actuate/autoconfigure/endpoint/web/ServletEndpointManagementContextConfiguration$WebMvcServletEndpointManagementContextConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.endpoint.web.ServletEndpointRegistrar]: Factory method 'servletEndpointRegistrar' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'gatewayControllerEndpoint' defined in class path resource [org/springframework/cloud/gateway/config/GatewayAutoConfiguration$GatewayActuatorConfiguration.class]: Unsatisfied dependency expressed through method 'gatewayControllerEndpoint' parameter 2; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'modifyRequestBodyGatewayFilterFactory' defined in class path resource [org/springframework/cloud/gateway/config/GatewayAutoConfiguration.class]: Unsatisfied dependency expressed through method 'modifyRequestBodyGatewayFilterFactory' parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.springframework.http.codec.ServerCodecConfigurer' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
The text was updated successfully, but these errors were encountered: