Open mattdkerr opened 4 years ago
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?
java -jar myapp.jar --debug
the start-up hangs when Springfox Swagger2 starts scanning the parameters of the REST controller- I'm running using gradlew bootRun
and passing --debug
unfortunately looks like it turns on debugging logs for gradle instead of java
So I can better understand did this application instance always serve rest and grpc controllers and only broke once introducing kroto services?
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).
Does the start up get hung up or is there an error written to console?
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.