Skip to content

Allow MVC handler methods to return any CharSequence type as view name [SPR-13165] #17756

@spring-projects-issues

Description

@spring-projects-issues

Christopher Smith opened SPR-13165 and commented

When a method does not have an explicit return type of String (which causes, among other things, problems with Spring HATEOAS), returning a Groovy GString (particularly helpful with building redirect: links) confuses MVC. Using the regular string-return semantics requires an explicit call to toString().

It would be helpful, when groovy.lang.GString is present on the classpath, for the dispatcher servlet to automatically call toString() on returned GString values.


Affects: 4.2 RC1

Issue Links:

Referenced from: commits a2d3c27

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions