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
Spring-MVC config "j8-async": Uses async servlet & Java 8 interface #1742
Conversation
default This template is mainly for Maven code-gen plugin use-case - when Swagger spec on existing project changes there is no need to manually copy/paste the new functions from the generated client. This will provide a default (empty) implementation to existing impl and user just need to override the stub implementation. Because it generates an interface instead of a concrete stub, an implementation will be needed to actuate a service end-point. And don't forget to put @controller on the implementation!
@icha024 thanks for the PR but the CI tests failed. Here is the log: https://api.travis-ci.org/jobs/97884873/log.txt?deansi=true Please review and let us know if you need help addressing the issue reported by CI. I would suggest you to add |
The previous patch to allow sub options to spring-mvc had removed the invalid Jersey2 option from spring-mvc codegen, this patch also fixes the associated test.
@wing328 All done |
@icha024 thanks but I don't see |
Added the executable and config file for spring-mvc's j8-async target.
@wing328 bin scripts are now added |
@icha024 when running 'mvn test` in the sample folder, I got the errors with the sample. Here is part of the error message:
Did you get similar error when running I would also suggest updating |
The spring-mvc j8-async code is now located in it's own sample directory with Java 8 enforced via Maven plug-in.
@wing328 The spring-mvc j8-async code is now located in it's own sample directory with Java 8 enforced via Maven plug-in. |
Spring-MVC config "j8-async": Uses async servlet & Java 8 interface
@icha024 If I understand correctly, a concrete class annotated by @controller needs to be added manually or the controller will not be created/scanned. Is that correct ? |
@cbornet Yes that is correct, it's not needed. In hindsight it should've been removed and replaced with a comment instead. BTW, if you are interested in using this with Maven, here's the plugin snippet that might be useful: |
In jaxrs generators the implementation class is generated if it doesn't exists. Would that work with your plugin ? It would be useful for the first generation. |
For the first generation that's ok, but the challenge we have is keeping the spec and code synced when spec changes (often pushed by a different team) - so an interface would work better for that. The 'default' implementation part is a nice to have. |
I mean that in jaxrs, there is an interface and an implementation. When you regenerate, the implementation is not overridden. |
Cool, didn't know that. That should work On Sat, Jun 4, 2016 at 7:53 AM, Christophe Bornet notifications@github.com
|
default
This template is mainly for Maven code-gen plugin use-case - when
Swagger spec on existing project changes there is no need to manually
copy/paste the new functions from the generated client. This will
provide a default (empty) implementation to existing impl and user just
need to override the stub implementation.
Because it generates an interface instead of a concrete stub, an
implementation will be needed to actuate a service end-point. And don't
forget to put @controller on the implementation!