From 2fb3ede3a6073f8ca702dff1098298d5eddf3261 Mon Sep 17 00:00:00 2001 From: Gerrit Meier Date: Thu, 3 Nov 2016 06:40:59 +0100 Subject: [PATCH] Document that port is omitted when it matches the scheme's default Closes gh-325 Closes gh-329 --- docs/src/docs/asciidoc/configuration.adoc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/src/docs/asciidoc/configuration.adoc b/docs/src/docs/asciidoc/configuration.adoc index 00c31ac6..178ac7b0 100644 --- a/docs/src/docs/asciidoc/configuration.adoc +++ b/docs/src/docs/asciidoc/configuration.adoc @@ -34,6 +34,9 @@ to change one or more of the defaults to suit your needs: include::{examples-dir}/com/example/mockmvc/CustomUriConfiguration.java[tags=custom-uri-configuration] ---- +NOTE: If the port is set to the default for the configured scheme (port 80 for HTTP or +port 443 for HTTPS), it will be omitted from any URIs in the generated snippets. + TIP: To configure a request's context path, use the `contextPath` method on `MockHttpServletRequestBuilder`.