Showing posts with label multiple pathvariables. Show all posts
Showing posts with label multiple pathvariables. Show all posts

Sunday, 19 August 2018

How to use multiple pathVariable in spring mvc using map


@RequestMapping("/hello/{userName}/{country}")
public methodName(@PathVariable Map<String,String> map){
    String userName = map.get("userName");
    String country = map.get("country");
}

and below code in dispatcher-servelet:

<mvc:annotation-driven/>

links for Data Structure

  1) 𝐁𝐞𝐜𝐨𝐦𝐞 𝐌𝐚𝐬𝐭𝐞𝐫 𝐢𝐧 𝐋𝐢𝐧𝐤𝐞𝐝 𝐋𝐢𝐬𝐭:  https://lnkd.in/gXQux4zj 2) 𝐀𝐥𝐥 𝐭𝐲𝐩𝐞𝐬 𝐨𝐟 𝐓𝐫𝐞𝐞 𝐓𝐫𝐚𝐯𝐞𝐫𝐬𝐚𝐥𝐬...