Skip to content

Provide a working example instead of unclear placeholders #34828

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Artur-
Copy link

@Artur- Artur- commented Apr 25, 2025

No description provided.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Apr 25, 2025
@rstoyanchev rstoyanchev self-assigned this Apr 30, 2025
@rstoyanchev rstoyanchev added type: documentation A documentation task in: web Issues in web modules (web, webmvc, webflux, websocket) and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Apr 30, 2025
@rstoyanchev rstoyanchev added this to the 6.2.7 milestone Apr 30, 2025
Copy link
Contributor

@rstoyanchev rstoyanchev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the suggestions.

We can't be too prescriptive about how the processing chain. These are generic operators and their use depends on the application needs.

That said we could incorporate some of this to provide general guidance and suggestions for how each operator might be used.

@Artur-
Copy link
Author

Artur- commented Apr 30, 2025

The challenge I faced with the javadoc was not having any clue what to do instead of "// ..." so some kind of comment or example would be better than the current one. Even though it's not a "you always want this" type of code snippet

@rstoyanchev
Copy link
Contributor

Understood, but this is more about understanding the (general purpose), Flux operators. Use doOnNext for anything imperative that doesn't block nor return a value. Use map for imperative transformations. Use concatMap for anything that requires potentially asynchronous handling. The rest is up to you. Again, I appreciate the suggestion and will incorporate something, but will also finetune a bit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: documentation A documentation task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants