spring mvc - Mismatch in @PathVariable resolving -


let's suppose have method signature:

@requestmapping(value = "/verifyusers/{site}/{users}", method = requestmethod.get) @responsebody    public list<string> verifyuser(     @pathvariable("site") string site, @pathvariable("users") string[] users) {     ... } 

receving request /verifyusers/aoud/farmaci.rain,farmaci.postacuti

we get: site="aoud" , users = [farmaci.rain, farmaci] lose second part of second string after dot ("postacuti")

i think it's fault of org.springframework.util.antpathmatcher ...

use below code prevent truncation of parameter after ' . '

@requestmapping(value = "/verifyusers/{site}/{users:.+}", method = requestmethod.get) @responsebody    public list<string> verifyuser(     @pathvariable("site") string site, @pathvariable("users") string[] users) {     ... } 

note: {users:.+}


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -