Java Code Examples for org.springframework.web.servlet.support.ServletUriComponentsBuilder#encode()

The following examples show how to use org.springframework.web.servlet.support.ServletUriComponentsBuilder#encode() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PasswordResetterImpl.java    From molgenis with GNU Lesser General Public License v3.0 5 votes vote down vote up
private URI createPasswordResetUri(String username, String token) {
  ServletUriComponentsBuilder builder = ServletUriComponentsBuilder.fromCurrentServletMapping();
  builder.encode();
  builder.path("/account/password/change");
  builder.queryParam("username", username);
  builder.queryParam("token", token);
  return builder.build().toUri();
}
 
Example 2
Source File: UriUtils.java    From molgenis with GNU Lesser General Public License v3.0 4 votes vote down vote up
private static ServletUriComponentsBuilder createBuilder() {
  ServletUriComponentsBuilder builder = ServletUriComponentsBuilder.fromCurrentServletMapping();
  builder.encode();
  return builder;
}
 
Example 3
Source File: RestControllerV2.java    From molgenis with GNU Lesser General Public License v3.0 4 votes vote down vote up
private ServletUriComponentsBuilder createUriBuilder() {
  ServletUriComponentsBuilder servletUriComponentsBuilder = fromCurrentServletMapping();
  servletUriComponentsBuilder.encode();
  return servletUriComponentsBuilder;
}