singletonList(new io.github.finoid.testify.spring.http.servlet.MockMvcBuilder.StaticViewResolver(view));
return this;
}
@@ -269,7 +268,7 @@ public MockMvcBuilder setSingleView(View view) {
* Provide a LocaleResolver instance.
* If not provided, the default one used is {@link AcceptHeaderLocaleResolver}.
*/
- public MockMvcBuilder setLocaleResolver(LocaleResolver localeResolver) {
+ public io.github.finoid.testify.spring.http.servlet.MockMvcBuilder setLocaleResolver(LocaleResolver localeResolver) {
this.localeResolver = localeResolver;
return this;
}
@@ -278,57 +277,36 @@ public MockMvcBuilder setLocaleResolver(LocaleResolver localeResolver) {
* Provide a custom FlashMapManager instance.
* If not provided, {@code SessionFlashMapManager} is used by default.
*/
- public MockMvcBuilder setFlashMapManager(FlashMapManager flashMapManager) {
+ public io.github.finoid.testify.spring.http.servlet.MockMvcBuilder setFlashMapManager(FlashMapManager flashMapManager) {
this.flashMapManager = flashMapManager;
return this;
}
/**
- * Enable URL path matching with parsed
- * {@link org.springframework.web.util.pattern.PathPattern PathPatterns}
- * instead of String pattern matching with a {@link org.springframework.util.PathMatcher}.
+ * Configure the parser to use for
+ * {@link org.springframework.web.util.pattern.PathPattern PathPatterns}.
+ * By default, this is a default instance of {@link PathPatternParser}.
*
* @param parser the parser to use
* @since 5.3
*/
- public MockMvcBuilder setPatternParser(@Nullable PathPatternParser parser) {
+ public io.github.finoid.testify.spring.http.servlet.MockMvcBuilder setPatternParser(@Nullable PathPatternParser parser) {
this.patternParser = parser;
this.preferPathMatcher = (this.patternParser == null);
return this;
}
- /**
- * Whether to use suffix pattern match (".*") when matching patterns to
- * requests. If enabled a method mapped to "/users" also matches to "/users.*".
- *
The default value is {@code false}.
- *
- * @deprecated as of 5.2.4. See class-level note in {@link RequestMappingHandlerMapping} on the deprecation of path extension config options
- */
- @Deprecated
- public MockMvcBuilder setUseSuffixPatternMatch(boolean useSuffixPatternMatch) {
- this.useSuffixPatternMatch = useSuffixPatternMatch;
- this.preferPathMatcher |= useSuffixPatternMatch;
- return this;
- }
-
- /**
- * Whether to match to URLs irrespective of the presence of a trailing slash.
- * If enabled a method mapped to "/users" also matches to "/users/".
- *
- * @deprecated as of 6.0, see {@link PathPatternParser#setMatchOptionalTrailingSeparator(boolean)}
- */
- @Deprecated(since = "6.0")
- public MockMvcBuilder setUseTrailingSlashPatternMatch(boolean useTrailingSlashPatternMatch) {
- this.useTrailingSlashPatternMatch = useTrailingSlashPatternMatch;
- return this;
- }
-
/**
* Set if ";" (semicolon) content should be stripped from the request URI. The value,
* if provided, is in turn set on
* {@link org.springframework.web.util.UrlPathHelper#setRemoveSemicolonContent(boolean)}.
+ *
+ * @deprecated use of {@link PathMatcher} and {@link UrlPathHelper} is deprecated
+ * for use at runtime in web modules in favor of parsed patterns with
+ * {@link PathPatternParser}.
*/
- public MockMvcBuilder setRemoveSemicolonContent(boolean removeSemicolonContent) {
+ @Deprecated(since = "7.0", forRemoval = true)
+ public io.github.finoid.testify.spring.http.servlet.MockMvcBuilder setRemoveSemicolonContent(boolean removeSemicolonContent) {
this.removeSemicolonContent = removeSemicolonContent;
return this;
}
@@ -341,7 +319,7 @@ public MockMvcBuilder setRemoveSemicolonContent(boolean removeSemicolonContent)
*
* @since 4.2.8
*/
- public MockMvcBuilder addPlaceholderValue(String name, String value) {
+ public io.github.finoid.testify.spring.http.servlet.MockMvcBuilder addPlaceholderValue(String name, String value) {
this.placeholderValues.put(name, value);
return this;
}
@@ -352,7 +330,7 @@ public MockMvcBuilder addPlaceholderValue(String name, String value) {
* @param factory the factory
* @since 5.0
*/
- public MockMvcBuilder setCustomHandlerMapping(Supplier factory) {
+ public io.github.finoid.testify.spring.http.servlet.MockMvcBuilder setCustomHandlerMapping(Supplier factory) {
this.handlerMappingFactory = factory;
return this;
}
@@ -363,7 +341,7 @@ public MockMvcBuilder setCustomHandlerMapping(Supplier additionalBeans) {
+ public io.github.finoid.testify.spring.http.servlet.MockMvcBuilder setAdditionalBeans(List