I am confused between the URL pattern / and /** w.r.t AntPAthMatcher.
I know /** is a universal pattern that will match all the URLs, but I am not sure what does / will match.
I have tried searching the difference, but no help.
/** will match any number of (0 or more) levels in a path, eg. it would match both /file and /some/path/file.
A single asterisk /* only matches 0 or more characters (not path levels) so it would match /file but not /some/path/file.
A single slash / would only match the root path.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With