spring-framework / org.springframework.web.servlet.config.annotation / ViewControllerRegistration / setViewName

setViewName

open fun setViewName(viewName: String): Unit

Set the view name to return. Optional.

If not specified, the view controller will return null as the view name in which case the configured RequestToViewNameTranslator will select the view name. The DefaultRequestToViewNameTranslator for example translates "/foo/bar" to "foo/bar".

See Also
org.springframework.web.servlet.view.DefaultRequestToViewNameTranslator