Double asterisk in a request mapping

rozerro :

What does it mean when double asterisk is present in a request mapping? For instance

@RequestMapping(value = { "/", "/welcome**" }, method =
RequestMethod.GET)  public ModelAndView welcomePage() { ...
micaro :

Universally speaking asterisks (in wildcard role) mean

/welcome* : anything in THIS folder or URL section, that starts with "/welcome" and ends before next "/" like /welcomePage.

/welcome** : any URL, that starts with "/welcome" including sub-folders and sub-sections of URL pattern like /welcome/section2/section3/ or /welcomePage/index.

/welcome/* : any file, folder or section inside welcome (before next "/") like /welcome/index.

/welcome/** : any files, folders, sections, sub-folders or sub-sections inside welcome.

In other words one asterisk * ends before next "/", two asterisks ** have no limits.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=453154&siteId=1