Skip to content

Commit 17ea114

Browse files
committed
Removes most deprecated items.
1 parent 4e2cd48 commit 17ea114

File tree

45 files changed

+18
-3546
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+18
-3546
lines changed

spring-cloud-gateway-mvc/src/main/java/org/springframework/cloud/gateway/mvc/ProxyExchange.java

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
import jakarta.servlet.http.HttpServletResponse;
4747
import jakarta.servlet.http.HttpServletResponseWrapper;
4848

49-
import org.springframework.cloud.gateway.mvc.config.ProxyProperties;
5049
import org.springframework.core.Conventions;
5150
import org.springframework.core.MethodParameter;
5251
import org.springframework.core.ParameterizedTypeReference;
@@ -139,12 +138,6 @@
139138
*/
140139
public class ProxyExchange<T> {
141140

142-
/**
143-
* Contains headers that are considered case-sensitive by default.
144-
* @deprecated {@link ProxyProperties#DEFAULT_SENSITIVE}
145-
*/
146-
public static Set<String> DEFAULT_SENSITIVE = ProxyProperties.DEFAULT_SENSITIVE;
147-
148141
private URI uri;
149142

150143
private RestTemplate rest;
@@ -211,17 +204,6 @@ public ProxyExchange<T> headers(HttpHeaders headers) {
211204
return this;
212205
}
213206

214-
/**
215-
* Sets the names of sensitive headers that are not passed downstream to the backend
216-
* service.
217-
* @param names the names of sensitive headers
218-
* @return this for convenience
219-
* @deprecated {@link #excluded(String...)}
220-
*/
221-
public ProxyExchange<T> sensitive(String... names) {
222-
return excluded(names);
223-
}
224-
225207
/**
226208
* Sets the names of excluded headers that are not passed downstream to the backend
227209
* service.

spring-cloud-gateway-mvc/src/main/java/org/springframework/cloud/gateway/mvc/config/ProxyExchangeArgumentResolver.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,6 @@ public void setAutoForwardedHeaders(Set<String> autoForwardedHeaders) {
6464
: autoForwardedHeaders.stream().map(String::toLowerCase).collect(toSet());
6565
}
6666

67-
@Deprecated
68-
public void setSensitive(Set<String> excluded) {
69-
setExcluded(excluded);
70-
}
71-
7267
public void setExcluded(Set<String> excluded) {
7368
this.excluded = excluded;
7469
}

spring-cloud-gateway-mvc/src/main/java/org/springframework/cloud/gateway/mvc/config/ProxyProperties.java

Lines changed: 0 additions & 119 deletions
This file was deleted.

spring-cloud-gateway-mvc/src/main/java/org/springframework/cloud/gateway/mvc/config/ProxyResponseAutoConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
@Configuration(proxyBeanMethods = false)
5959
@ConditionalOnWebApplication
6060
@ConditionalOnClass({ HandlerMethodReturnValueHandler.class })
61-
@EnableConfigurationProperties({ ProxyExchangeWebMvcProperties.class, ProxyProperties.class })
61+
@EnableConfigurationProperties({ ProxyExchangeWebMvcProperties.class })
6262
public class ProxyResponseAutoConfiguration implements WebMvcConfigurer {
6363

6464
@Autowired

spring-cloud-gateway-mvc/src/test/java/org/springframework/cloud/gateway/mvc/GetWithBodyRequestTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
import org.springframework.boot.web.client.RestTemplateBuilder;
3434
import org.springframework.cloud.gateway.mvc.GetWithBodyRequestTests.TestApplication.Foo;
3535
import org.springframework.cloud.gateway.mvc.config.ProxyExchangeArgumentResolver;
36-
import org.springframework.cloud.gateway.mvc.config.ProxyProperties;
36+
import org.springframework.cloud.gateway.mvc.config.ProxyExchangeWebMvcProperties;
3737
import org.springframework.cloud.gateway.mvc.http.GetWithBodyRequestClientHttpRequestFactory;
3838
import org.springframework.context.annotation.Bean;
3939
import org.springframework.http.HttpEntity;
@@ -108,7 +108,7 @@ public void setHome(URI home) {
108108
}
109109

110110
@Bean
111-
public ProxyExchangeArgumentResolver proxyExchangeArgumentResolver(final ProxyProperties proxy) {
111+
public ProxyExchangeArgumentResolver proxyExchangeArgumentResolver(final ProxyExchangeWebMvcProperties proxy) {
112112
ProxyExchangeArgumentResolver resolver = new ProxyExchangeArgumentResolver(
113113
generateConfiguredRestTemplate());
114114
resolver.setHeaders(proxy.convertHeaders());

spring-cloud-gateway-mvc/src/test/java/org/springframework/cloud/gateway/mvc/config/ProxyExchangeWebmvcPropertiesMigrationTests.java

Lines changed: 0 additions & 52 deletions
This file was deleted.

spring-cloud-gateway-server-mvc/src/main/java/org/springframework/cloud/gateway/server/mvc/config/GatewayMvcProperties.java

Lines changed: 1 addition & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
package org.springframework.cloud.gateway.server.mvc.config;
1818

19-
import java.time.Duration;
2019
import java.util.ArrayList;
2120
import java.util.Arrays;
2221
import java.util.LinkedHashMap;
@@ -26,7 +25,6 @@
2625
import jakarta.validation.constraints.NotNull;
2726

2827
import org.springframework.boot.context.properties.ConfigurationProperties;
29-
import org.springframework.boot.context.properties.DeprecatedConfigurationProperty;
3028
import org.springframework.core.style.ToStringCreator;
3129
import org.springframework.http.MediaType;
3230

@@ -52,8 +50,6 @@ public class GatewayMvcProperties {
5250
@Valid
5351
private LinkedHashMap<String, RouteProperties> routesMap = new LinkedHashMap<>();
5452

55-
private HttpClient httpClient = new HttpClient();
56-
5753
/**
5854
* Mime-types that are streaming.
5955
*/
@@ -88,10 +84,6 @@ public void setRoutesMap(LinkedHashMap<String, RouteProperties> routesMap) {
8884
this.routesMap = routesMap;
8985
}
9086

91-
public HttpClient getHttpClient() {
92-
return httpClient;
93-
}
94-
9587
public List<MediaType> getStreamingMediaTypes() {
9688
return streamingMediaTypes;
9789
}
@@ -118,95 +110,12 @@ public void setTrustedProxies(String trustedProxies) {
118110

119111
@Override
120112
public String toString() {
121-
return new ToStringCreator(this).append("httpClient", httpClient)
122-
.append("routes", routes)
113+
return new ToStringCreator(this).append("routes", routes)
123114
.append("routesMap", routesMap)
124115
.append("streamingMediaTypes", streamingMediaTypes)
125116
.append("streamingBufferSize", streamingBufferSize)
126117
.append("trustedProxies", trustedProxies)
127118
.toString();
128119
}
129120

130-
/**
131-
* @deprecated in favor of spring.http.client.
132-
*/
133-
@Deprecated
134-
public static class HttpClient {
135-
136-
/** The HttpClient connect timeout. */
137-
private Duration connectTimeout;
138-
139-
/** The HttpClient read timeout. */
140-
private Duration readTimeout;
141-
142-
/** The name of the SSL bundle to use. */
143-
private String sslBundle;
144-
145-
/** The HttpClient type. Defaults to JDK. */
146-
private HttpClientType type = HttpClientType.JDK;
147-
148-
@Deprecated
149-
@DeprecatedConfigurationProperty(replacement = "spring.http.client.connect-timeout", since = "4.2.0")
150-
public Duration getConnectTimeout() {
151-
return connectTimeout;
152-
}
153-
154-
public void setConnectTimeout(Duration connectTimeout) {
155-
this.connectTimeout = connectTimeout;
156-
}
157-
158-
@Deprecated
159-
@DeprecatedConfigurationProperty(replacement = "spring.http.client.read-timeout", since = "4.2.0")
160-
public Duration getReadTimeout() {
161-
return readTimeout;
162-
}
163-
164-
public void setReadTimeout(Duration readTimeout) {
165-
this.readTimeout = readTimeout;
166-
}
167-
168-
@Deprecated
169-
@DeprecatedConfigurationProperty(replacement = "spring.http.client.ssl.bundle", since = "4.2.0")
170-
public String getSslBundle() {
171-
return sslBundle;
172-
}
173-
174-
public void setSslBundle(String sslBundle) {
175-
this.sslBundle = sslBundle;
176-
}
177-
178-
@Deprecated
179-
public HttpClientType getType() {
180-
return type;
181-
}
182-
183-
public void setType(HttpClientType type) {
184-
this.type = type;
185-
}
186-
187-
@Override
188-
public String toString() {
189-
return new ToStringCreator(this).append("connectTimeout", connectTimeout)
190-
.append("readTimeout", readTimeout)
191-
.append("sslBundle", sslBundle)
192-
.append("type", type)
193-
.toString();
194-
}
195-
196-
}
197-
198-
public enum HttpClientType {
199-
200-
/**
201-
* Use JDK HttpClient.
202-
*/
203-
JDK,
204-
205-
/**
206-
* Auto-detect the HttpClient.
207-
*/
208-
AUTODETECT
209-
210-
}
211-
212121
}

0 commit comments

Comments
 (0)