Skip to content
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

[REQ] [kotlin-spring] Reactive Kotlin Spring Server Generator #2765

Closed
botcoder opened this issue Apr 29, 2019 · 7 comments
Closed

[REQ] [kotlin-spring] Reactive Kotlin Spring Server Generator #2765

botcoder opened this issue Apr 29, 2019 · 7 comments

Comments

@botcoder
Copy link

Describe the solution you'd like

Support webflux in the same way as the Spring server generator, when using kotlin-spring with spring-boot library.

Describe alternatives you've considered

Wrap ResponseEntity with Mono/Flux.

Additional context

Java support was added at PR #571, but Kotlin support is missing.

@auto-labeler
Copy link

auto-labeler bot commented Apr 29, 2019

👍 Thanks for opening this issue!
🏷 I have applied any labels matching special text in your issue.

The team will review the labels and make any necessary changes.

@wing328
Copy link
Member

wing328 commented Apr 30, 2019

@botcoder that's a reasonable suggestion. May I know if you've time to contribute the enhancement? We can show you some good starting points.

@sylvainmoindron
Copy link
Contributor

since spring 5.2 support kotlin coroutines, i'm interesed to add reactive behavior with coroutines for kotlin-spring generator. should i start from @botcoder work ?

@botcoder
Copy link
Author

since spring 5.2 support kotlin coroutines, i'm interesed to add reactive behavior with coroutines for kotlin-spring generator. should i start from @botcoder work ?

You can ignore my change as I just added a "Mono/Flux" wrapper, but it's incomplete as it doesn't allow the user to change the response headers, and adding a reference to ServerWebExchange doesn't work on webflux, so I closed the pull request.

Coroutine would be a much better solution, I'll be looking forward to it. Thank you.

@sylvainmoindron
Copy link
Contributor

I will add a reactive support via coroutines then. should I also remove any reference to mono/flux that are already in the master ? (in the template there a reference to reactive but they cannot be triggered because there is no reactive option in the kotlin-spring at the moment)

@botcoder
Copy link
Author

It seems those references were added by mistake (ie, copy+paste from spring-mvc, perhaps).

@sylvainmoindron
Copy link
Contributor

since the PR #2934 is merged, shouldn't this request be closed?

@wing328 wing328 closed this as completed Jun 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants