Skip to content

Make it easier to provide a custom RequestToViewNameTranslator #40563

@wilkinsona

Description

@wilkinsona

@dsyer wants to customize the RequestToViewNameTranslator. It can be done today with a BeanPostProcessor for the viewNameTranslator bean. We could make it easier by overriding the viewNameTranslator() method and making it @ConditionalOnMissingBean(name = DispatcherServlet.REQUEST_TO_VIEW_NAME_TRANSLATOR_BEAN_NAME). This would be similar to what we did with flashMapManager() in #24207. Interestingly, we considered doing the same for RequestToViewNameTranslator at that time but @rstoyanchev suggested that we leave it out for now. Looks like the time has come.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: supersededAn issue that has been superseded by another

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions