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

Correct documentation for "other return values" from a web controller method #29349

Closed
howard-repos opened this issue Oct 19, 2022 · 1 comment
Assignees
Labels
type: documentation A documentation task
Milestone

Comments

@howard-repos
Copy link

In https://docs.spring.io/spring-framework/docs/5.3.23/reference/html/web.html#mvc-ann-return-types, document states

Any return value that does not match any of the earlier values in this table and that is a String or void is treated as a view name (default view name selection through RequestToViewNameTranslator applies), provided it is not a simple type, as determined by BeanUtils#isSimpleProperty. Values that are simple types remain unresolved

However, it's unclear what will happen if a return value is not simple type and is not a String or void.

BTW, String or void is already in this table, so I think maybe there is a mistake here?

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Oct 19, 2022
@rstoyanchev rstoyanchev self-assigned this Nov 1, 2022
@rstoyanchev rstoyanchev added type: documentation A documentation task and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Nov 1, 2022
@rstoyanchev rstoyanchev added this to the 5.3.24 milestone Nov 1, 2022
@rstoyanchev
Copy link
Contributor

Well spotted, this is confusing. Indeed String and void are already covered. What it should say is that any other Object is treated as a model attribute by default.

@rstoyanchev rstoyanchev changed the title Documentation needs to be updated for "Return Values" of "Handler Methods" in web mvc Correct documentation for "other return values" from a web controller method Nov 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: documentation A documentation task
Projects
None yet
Development

No branches or pull requests

3 participants