-
Notifications
You must be signed in to change notification settings - Fork 29
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
Adding Kroto Plus to a project with Springfox Swagger2 causes infinite loop before start #96
Comments
Thanks for submitting this issue. So I can better understand did this application instance always serve rest and grpc controllers and only broke once introducing kroto services? Does the start up get hung up or is there an error written to console? |
So I don’t think the issue lies with spring specifically. I have a local project with kroto and spring working but without any rest controller or spring fox configured. Are you able to startup your application with the debug flag and see exactly what stage does the start up hang?
|
the start-up hangs when Springfox Swagger2 starts scanning the parameters of the REST controller- I'm running using |
It always served REST and gRPC, and recently added Kroto. Then we added Swagger2 to both our services (the other one doesn't use Kroto yet).
Without debug level it looks hung, but with it on, it's spewing stuff about walking gRPC classes and looks like it's in an infinite loop |
Can you try again but disabling except the proto builders generator. Im want to be able to isolate which generator is creating code that hangs up spring fox. My immediate guess it the proto builders generator, specifically because it is the only one creating resources used / scanned by spring fox |
Sorry, I haven't had a chance to try this yet. When I disabled the unpackBuilders option I realized I had to first remove the code that used it to even get back to where the error was. I'm just about done with that work, so I'll be able to cleanly add Kroto Plus back in afterwards in a test branch. Unfortunately it is lower priority than a few other tasks on my plate at work, so it may take a few days to get back to. |
Thanks for the help debugging the issue. When you do get a chance to get back to it, you can do a static import of the builder objects so you don’t have to update the usages in your code. |
Arrangement:
Project with a Spring Web MVC
@RestController
that uses a protobuf generated class as an input, and calls the same server code as the@GrpcSpringService
(using https://github.com/yidongnan/grpc-spring-boot-starter). Kroto Plus configured to generate builders, message extensions, and coroutines for the service and messages defined in the proto files.Kroto Plus version
0.6.0-SNAPSHOT
was usedExpected:
Works the same as before, starts up fine with a Swagger UI.
Actual:
Fails to start, gets lost in the gRPC generated code.
Workaround:
Remove Kroto Plus, observe that it starts up again.
The text was updated successfully, but these errors were encountered: