Skip to content

Make it easier to provide a custom RequestToViewNameTranslator #40563

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

Closed
wilkinsona opened this issue Apr 29, 2024 · 1 comment
Closed

Make it easier to provide a custom RequestToViewNameTranslator #40563

wilkinsona opened this issue Apr 29, 2024 · 1 comment
Labels
status: superseded An issue that has been superseded by another

Comments

@wilkinsona
Copy link
Member

@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.

@wilkinsona wilkinsona added the type: enhancement A general enhancement label Apr 29, 2024
@wilkinsona wilkinsona added this to the 3.4.x milestone Apr 29, 2024
@philwebb
Copy link
Member

Closing in favor of PR #40874. Thanks @rohitp-a

@philwebb philwebb closed this as not planned Won't fix, can't repro, duplicate, stale May 22, 2024
@philwebb philwebb added status: superseded An issue that has been superseded by another and removed type: enhancement A general enhancement labels May 22, 2024
@philwebb philwebb removed this from the 3.4.x milestone May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: superseded An issue that has been superseded by another
Projects
None yet
Development

No branches or pull requests

2 participants