Fix ServletUriComponentsBuilder examples in reference docs.

Fixed two problems.

  • Type mismatch
  • Comments are inaccurate

before

// Re-uses host, port and context path...

ServletUriComponentsBuilder ucb = ServletUriComponentsBuilder.fromContextPath(request)
        .path("/accounts").build()

after

// Re-uses host, port, scheme and context path...

URI uri = ServletUriComponentsBuilder.fromContextPath(request)
        .path("/accounts")
        .build()
        .toUri();

Comment From: pivotal-cla

@wkwkhautbois Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

Comment From: pivotal-cla

@wkwkhautbois Thank you for signing the Contributor License Agreement!

Comment From: sbrannen

Good catch!

This has been merged into 5.3.x and main.

Thanks for making your first contribution to the Spring Framework. 👍