为什么我不能TreeMap<String,String>在 @RequestParam 之后使用 ?当我使用时它有效
Map<String,String>
例子:
@RequestMapping(value = "customers/new", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<String> createAuthorizationRole(
@RequestParam TreeMap<String, String> hierarchy,
@RequestHeader(name = "userid") String userid,
@RequestHeader(name = "clientid") String clientid,
@RequestHeader(name = "authorization") String authToken) {
return new ResponseEntity<>("new Customer created", HttpStatus.OK);
}
这是我看到的错误:
java.lang.IllegalStateException: argument type mismatch
HandlerMethod details:
Controller [com.demo.customer.odr.pc.branchAuthorization.BranchAuthorizationController]
Method [public org.springframework.http.ResponseEntity<java.lang.String> com.walmart.replenishment.odr.pc.branchAuthorization.BranchAuthorizationController.createAuthorizationRole(java.util.TreeMap<java.lang.String, java.lang.String>,java.lang.String,java.lang.String,java.lang.String)]
Resolved arguments:
[0] [type=java.util.LinkedHashMap] [value={country=US, division=1, department=17, category=9295, subcategory=21032, subclass=0, fineline=9379}]
[1] [type=java.lang.String] [value=office\r0sss]
[2] [type=java.lang.String] [value=05af7587-2209-49e3-9193-64828ad240b3]
[3] [type=java.lang.String] [value=dhfdrNGXU7j19DZb]
holdtom
相关分类