-
Notifications
You must be signed in to change notification settings - Fork 38.4k
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
dot in URL breaks @PathVariable binding [SPR-5778] #10448
Comments
Kenny MacLeod commented Sorry, that should've been #10307 |
Arjen Poutsma commented Added markup. |
Arjen Poutsma commented This is an unfortunate side-effect of the implicit matching for .* in the DefaultAnnotationHandlerMapping. Basically, every RequestMapping you specify also matches for You can disable this setting by defining an explicit DefaultAnnotationHandlerMapping in your servlet context, and setting the useDefaultSuffixPattern to false (the default is true). |
Arjen Poutsma commented Reopened because of wrong resolution. |
Giridhar Nandigam commented Arjen, Will this issue not be fixed or is it resolved? |
Giridhar Nandigam commented The resolution is to use useDefaultSuffixPattern = false on DefaultAnnotationHandlerMapping. Mis-understood by wrong resolution. |
Kenny MacLeod opened SPR-5778 and commented
Take the following REST endpoint:
If you hit this with the URL
it works fine, with both variables binding as expected. If, however, you try
you get
The second dot in the URL is causing the trailing 1 to be stripped off somewhere, so that latitude is bound correctly, but longitude isn't.
If you add a trailing slash to the mapping (i.e. "/lat/{latitude}/long/{longitude}/") and add a trailing slash to the URL, it works fine.
This may be related to #8317, but that issue looks to have been corrupted somehow (affects M3, fixed for M3?)
Affects: 3.0 M3
1 votes, 3 watchers
The text was updated successfully, but these errors were encountered: