I have following request mapping.
@RequestMapping(value = "/{userId}", produces = { MediaTypes.HAL_JSON_VALUE })
@ResponseStatus(HttpStatus.OK)
public Resource<UserDTO> findUser(@PathVariable final String userId) {
User user = administrationService.getSecurityUserById(userId);
return userResourceAssembler.toResource(modelMapper.map(user, UserDTO.class));
}
I use RestTemplate
to get the resource. The user ids passed in the url contain a dot (.) like: john.doe -> request URL: http://mysite/users/john.doe
When the above method gets called I only get john in @PathVariable userId.
How can this be fixed? to get john.doe
Thx.