Remove deprecated APIs in spring-web

See gh-33809
This commit is contained in:
rstoyanchev
2025-01-13 16:30:14 +00:00
parent 00ee0ab99c
commit 9ddbf800b9
16 changed files with 19 additions and 545 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2024 the original author or authors.
* Copyright 2002-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -182,8 +182,6 @@ public class RequestMappingHandlerAdapter extends AbstractHandlerMethodAdapter
private ReactiveAdapterRegistry reactiveAdapterRegistry = ReactiveAdapterRegistry.getSharedInstance();
private boolean ignoreDefaultModelOnRedirect = true;
private int cacheSecondsForSessionAttributeHandlers = 0;
private boolean synchronizeOnSession = false;
@@ -468,26 +466,6 @@ public class RequestMappingHandlerAdapter extends AbstractHandlerMethodAdapter
return this.reactiveAdapterRegistry;
}
/**
* By default, the content of the "default" model is used both during
* rendering and redirect scenarios. Alternatively a controller method
* can declare a {@link RedirectAttributes} argument and use it to provide
* attributes for a redirect.
* <p>Setting this flag to {@code true} guarantees the "default" model is
* never used in a redirect scenario even if a RedirectAttributes argument
* is not declared. Setting it to {@code false} means the "default" model
* may be used in a redirect if the controller method doesn't declare a
* RedirectAttributes argument.
* <p>As of 6.0, this property is set to {@code true} by default.
* @see RedirectAttributes
* @deprecated as of 6.0 without a replacement; once removed, the default
* model will always be ignored on redirect
*/
@Deprecated(since = "6.0")
public void setIgnoreDefaultModelOnRedirect(boolean ignoreDefaultModelOnRedirect) {
this.ignoreDefaultModelOnRedirect = ignoreDefaultModelOnRedirect;
}
/**
* Specify the strategy to store session attributes with. The default is
* {@link org.springframework.web.bind.support.DefaultSessionAttributeStore},
@@ -947,7 +925,6 @@ public class RequestMappingHandlerAdapter extends AbstractHandlerMethodAdapter
ModelAndViewContainer mavContainer = new ModelAndViewContainer();
mavContainer.addAllAttributes(RequestContextUtils.getInputFlashMap(request));
modelFactory.initModel(webRequest, mavContainer, invocableMethod);
mavContainer.setIgnoreDefaultModelOnRedirect(this.ignoreDefaultModelOnRedirect);
if (asyncManager.hasConcurrentResult()) {
Object result = asyncManager.getConcurrentResult();