Reputation: 4466
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.
Upvotes: 3
Views: 600
Reputation: 7048
/**
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.
Upvotes: 3