-
Notifications
You must be signed in to change notification settings - Fork 576
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
Add trailing slash to dashboard #5811
base: main-3
Are you sure you want to change the base?
Add trailing slash to dashboard #5811
Conversation
- Boot 3.x changed handling of trailing slash meaning it's now adviced to define both /dashboard and /dashboard/ in UiController
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -27,7 +27,7 @@ | |||
* @author Gunnar Hillert | |||
*/ | |||
@Controller | |||
@RequestMapping(UiController.WEB_UI_INDEX_PAGE_ROUTE) | |||
@RequestMapping({ UiController.WEB_UI_INDEX_PAGE_ROUTE, UiController.WEB_UI_INDEX_PAGE_ROUTE + "/" }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because this approach only fixes this controller, until we adjust globally (recommended by the release notes) I would rather set the default as it was before using something like:
@Configuration
public class WebConfiguration implements WebMvcConfigurer {
@Override
public void configurePathMatch(PathMatchConfigurer configurer) {
configurer.setUseTrailingSlashMatch(true);
}
}
Wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@onobc sorry I missed your question. I'd rather not to set it globally because setUseTrailingSlashMatch
is already deprecated. We anyway need to handle this in a recommended way going forward.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@onobc sorry I missed your question
No worries @jvalkeal.
I'd rather not to set it globally because setUseTrailingSlashMatch is already deprecated. We anyway need to handle this in a recommended way going forward.
If we don't fix it globally then maybe we should not fix the dashboard either. Since this is a major update we can just list this as a breaking change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @jvalkeal - please see my comment.
Essentially to fix latter: