Remove code deprecated in 2.x and add since and forRemoval attributes

Closes gh-32548
Closes gh-32549
pull/29403/merge
Andy Wilkinson 2 years ago
parent 03b3a772c9
commit 51df7813a5

@ -149,12 +149,13 @@ public class MetricsProperties {
*/ */
private String metricName = "http.client.requests"; private String metricName = "http.client.requests";
@Deprecated @Deprecated(since = "3.0.0", forRemoval = true)
@DeprecatedConfigurationProperty(replacement = "management.observations.http.client.requests.name") @DeprecatedConfigurationProperty(replacement = "management.observations.http.client.requests.name")
public String getMetricName() { public String getMetricName() {
return this.metricName; return this.metricName;
} }
@Deprecated(since = "3.0.0", forRemoval = true)
public void setMetricName(String metricName) { public void setMetricName(String metricName) {
this.metricName = metricName; this.metricName = metricName;
} }

@ -20,7 +20,6 @@ import java.util.Map;
import org.springframework.boot.actuate.autoconfigure.metrics.export.properties.StepRegistryProperties; import org.springframework.boot.actuate.autoconfigure.metrics.export.properties.StepRegistryProperties;
import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.DeprecatedConfigurationProperty;
/** /**
* {@link ConfigurationProperties @ConfigurationProperties} for configuring Dynatrace * {@link ConfigurationProperties @ConfigurationProperties} for configuring Dynatrace
@ -56,28 +55,6 @@ public class DynatraceProperties extends StepRegistryProperties {
this.apiToken = apiToken; this.apiToken = apiToken;
} }
@Deprecated
@DeprecatedConfigurationProperty(replacement = "management.dynatrace.metrics.export.v1.device-id")
public String getDeviceId() {
return this.v1.getDeviceId();
}
@Deprecated
public void setDeviceId(String deviceId) {
this.v1.setDeviceId(deviceId);
}
@Deprecated
@DeprecatedConfigurationProperty(replacement = "management.dynatrace.metrics.export.v1.technology-type")
public String getTechnologyType() {
return this.v1.getTechnologyType();
}
@Deprecated
public void setTechnologyType(String technologyType) {
this.v1.setTechnologyType(technologyType);
}
public String getUri() { public String getUri() {
return this.uri; return this.uri;
} }
@ -86,17 +63,6 @@ public class DynatraceProperties extends StepRegistryProperties {
this.uri = uri; this.uri = uri;
} }
@Deprecated
@DeprecatedConfigurationProperty(replacement = "management.dynatrace.metrics.export.v1.group")
public String getGroup() {
return this.v1.getGroup();
}
@Deprecated
public void setGroup(String group) {
this.v1.setGroup(group);
}
public V1 getV1() { public V1 getV1() {
return this.v1; return this.v1;
} }

@ -30,8 +30,6 @@ import io.prometheus.client.exemplars.ExemplarSampler;
import io.prometheus.client.exemplars.tracer.common.SpanContextSupplier; import io.prometheus.client.exemplars.tracer.common.SpanContextSupplier;
import io.prometheus.client.exporter.BasicAuthHttpConnectionFactory; import io.prometheus.client.exporter.BasicAuthHttpConnectionFactory;
import io.prometheus.client.exporter.PushGateway; import io.prometheus.client.exporter.PushGateway;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.ObjectProvider; import org.springframework.beans.factory.ObjectProvider;
import org.springframework.boot.actuate.autoconfigure.endpoint.condition.ConditionalOnAvailableEndpoint; import org.springframework.boot.actuate.autoconfigure.endpoint.condition.ConditionalOnAvailableEndpoint;
@ -52,7 +50,6 @@ import org.springframework.boot.context.properties.EnableConfigurationProperties
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment; import org.springframework.core.env.Environment;
import org.springframework.core.log.LogMessage;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
/** /**
@ -120,8 +117,6 @@ public class PrometheusMetricsExportAutoConfiguration {
@ConditionalOnProperty(prefix = "management.prometheus.metrics.export.pushgateway", name = "enabled") @ConditionalOnProperty(prefix = "management.prometheus.metrics.export.pushgateway", name = "enabled")
public static class PrometheusPushGatewayConfiguration { public static class PrometheusPushGatewayConfiguration {
private static final Log logger = LogFactory.getLog(PrometheusPushGatewayConfiguration.class);
/** /**
* The fallback job name. We use 'spring' since there's a history of Prometheus * The fallback job name. We use 'spring' since there's a history of Prometheus
* spring integration defaulting to that name from when Prometheus integration * spring integration defaulting to that name from when Prometheus integration
@ -132,7 +127,7 @@ public class PrometheusMetricsExportAutoConfiguration {
@Bean @Bean
@ConditionalOnMissingBean @ConditionalOnMissingBean
public PrometheusPushGatewayManager prometheusPushGatewayManager(CollectorRegistry collectorRegistry, public PrometheusPushGatewayManager prometheusPushGatewayManager(CollectorRegistry collectorRegistry,
PrometheusProperties prometheusProperties, Environment environment) { PrometheusProperties prometheusProperties, Environment environment) throws MalformedURLException {
PrometheusProperties.Pushgateway properties = prometheusProperties.getPushgateway(); PrometheusProperties.Pushgateway properties = prometheusProperties.getPushgateway();
Duration pushRate = properties.getPushRate(); Duration pushRate = properties.getPushRate();
String job = getJob(properties, environment); String job = getJob(properties, environment);
@ -147,15 +142,8 @@ public class PrometheusMetricsExportAutoConfiguration {
shutdownOperation); shutdownOperation);
} }
private PushGateway initializePushGateway(String url) { private PushGateway initializePushGateway(String url) throws MalformedURLException {
try { return new PushGateway(new URL(url));
return new PushGateway(new URL(url));
}
catch (MalformedURLException ex) {
logger.warn(LogMessage
.format("Invalid PushGateway base url '%s': update your configuration to a valid URL", url));
return new PushGateway(url);
}
} }
private String getJob(PrometheusProperties.Pushgateway properties, Environment environment) { private String getJob(PrometheusProperties.Pushgateway properties, Environment environment) {

@ -30,7 +30,7 @@ import org.springframework.http.client.observation.ClientHttpObservationConventi
* *
* @author Brian Clozel * @author Brian Clozel
*/ */
@SuppressWarnings("deprecation") @SuppressWarnings({ "removal" })
class ClientHttpObservationConventionAdapter implements ClientHttpObservationConvention { class ClientHttpObservationConventionAdapter implements ClientHttpObservationConvention {
private final String metricName; private final String metricName;
@ -48,6 +48,7 @@ class ClientHttpObservationConventionAdapter implements ClientHttpObservationCon
} }
@Override @Override
@SuppressWarnings("deprecation")
public KeyValues getLowCardinalityKeyValues(ClientHttpObservationContext context) { public KeyValues getLowCardinalityKeyValues(ClientHttpObservationContext context) {
KeyValues keyValues = KeyValues.empty(); KeyValues keyValues = KeyValues.empty();
Iterable<Tag> tags = this.tagsProvider.getTags(context.getUriTemplate(), context.getCarrier(), Iterable<Tag> tags = this.tagsProvider.getTags(context.getUriTemplate(), context.getCarrier(),

@ -32,7 +32,7 @@ import org.springframework.web.reactive.function.client.WebClient;
* *
* @author Brian Clozel * @author Brian Clozel
*/ */
@SuppressWarnings("deprecation") @SuppressWarnings({ "deprecation", "removal" })
class ClientObservationConventionAdapter implements ClientObservationConvention { class ClientObservationConventionAdapter implements ClientObservationConvention {
private static final String URI_TEMPLATE_ATTRIBUTE = WebClient.class.getName() + ".uriTemplate"; private static final String URI_TEMPLATE_ATTRIBUTE = WebClient.class.getName() + ".uriTemplate";

@ -62,7 +62,7 @@ public class HttpClientObservationsAutoConfiguration {
@Bean @Bean
@Order(0) @Order(0)
@SuppressWarnings("deprecation") @SuppressWarnings("removal")
MeterFilter metricsHttpClientUriTagFilter(ObservationProperties observationProperties, MeterFilter metricsHttpClientUriTagFilter(ObservationProperties observationProperties,
MetricsProperties metricsProperties) { MetricsProperties metricsProperties) {
String metricName = metricsProperties.getWeb().getClient().getRequest().getMetricName(); String metricName = metricsProperties.getWeb().getClient().getRequest().getMetricName();

@ -40,7 +40,7 @@ import org.springframework.web.client.RestTemplate;
@Configuration(proxyBeanMethods = false) @Configuration(proxyBeanMethods = false)
@ConditionalOnClass(RestTemplate.class) @ConditionalOnClass(RestTemplate.class)
@ConditionalOnBean(RestTemplateBuilder.class) @ConditionalOnBean(RestTemplateBuilder.class)
@SuppressWarnings("deprecation") @SuppressWarnings("removal")
class RestTemplateObservationConfiguration { class RestTemplateObservationConfiguration {
@Bean @Bean

@ -37,7 +37,7 @@ import org.springframework.web.reactive.function.client.WebClient;
*/ */
@Configuration(proxyBeanMethods = false) @Configuration(proxyBeanMethods = false)
@ConditionalOnClass(WebClient.class) @ConditionalOnClass(WebClient.class)
@SuppressWarnings("deprecation") @SuppressWarnings("removal")
class WebClientObservationConfiguration { class WebClientObservationConfiguration {
@Bean @Bean

@ -61,7 +61,7 @@ class CompositeHandlerAdapter implements HandlerAdapter {
} }
@Override @Override
@Deprecated @Deprecated(since = "2.4.9", forRemoval = false)
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
public long getLastModified(HttpServletRequest request, Object handler) { public long getLastModified(HttpServletRequest request, Object handler) {
Optional<HandlerAdapter> adapter = getAdapter(handler); Optional<HandlerAdapter> adapter = getAdapter(handler);

@ -50,7 +50,7 @@ class DynatraceMetricsExportAutoConfigurationTests {
@Test @Test
void failsWithADeviceIdWithoutAUri() { void failsWithADeviceIdWithoutAUri() {
this.contextRunner.withUserConfiguration(BaseConfiguration.class) this.contextRunner.withUserConfiguration(BaseConfiguration.class)
.withPropertyValues("management.dynatrace.metrics.export.device-id:dev-1") .withPropertyValues("management.dynatrace.metrics.export.v1.device-id:dev-1")
.run((context) -> assertThat(context).hasFailed()); .run((context) -> assertThat(context).hasFailed());
} }

@ -45,14 +45,6 @@ class DynatracePropertiesConfigAdapterTests {
assertThat(new DynatracePropertiesConfigAdapter(properties).apiToken()).isEqualTo("123ABC"); assertThat(new DynatracePropertiesConfigAdapter(properties).apiToken()).isEqualTo("123ABC");
} }
@Test
@Deprecated
void whenPropertiesDeviceIdIsSetAdapterDeviceIdReturnsIt() {
DynatraceProperties properties = new DynatraceProperties();
properties.setDeviceId("dev-1");
assertThat(new DynatracePropertiesConfigAdapter(properties).deviceId()).isEqualTo("dev-1");
}
@Test @Test
void whenPropertiesV1DeviceIdIsSetAdapterDeviceIdReturnsIt() { void whenPropertiesV1DeviceIdIsSetAdapterDeviceIdReturnsIt() {
DynatraceProperties properties = new DynatraceProperties(); DynatraceProperties properties = new DynatraceProperties();
@ -60,14 +52,6 @@ class DynatracePropertiesConfigAdapterTests {
assertThat(new DynatracePropertiesConfigAdapter(properties).deviceId()).isEqualTo("dev-1"); assertThat(new DynatracePropertiesConfigAdapter(properties).deviceId()).isEqualTo("dev-1");
} }
@Test
@Deprecated
void whenPropertiesTechnologyTypeIsSetAdapterTechnologyTypeReturnsIt() {
DynatraceProperties properties = new DynatraceProperties();
properties.setTechnologyType("tech-1");
assertThat(new DynatracePropertiesConfigAdapter(properties).technologyType()).isEqualTo("tech-1");
}
@Test @Test
void whenPropertiesV1TechnologyTypeIsSetAdapterTechnologyTypeReturnsIt() { void whenPropertiesV1TechnologyTypeIsSetAdapterTechnologyTypeReturnsIt() {
DynatraceProperties properties = new DynatraceProperties(); DynatraceProperties properties = new DynatraceProperties();
@ -75,14 +59,6 @@ class DynatracePropertiesConfigAdapterTests {
assertThat(new DynatracePropertiesConfigAdapter(properties).technologyType()).isEqualTo("tech-1"); assertThat(new DynatracePropertiesConfigAdapter(properties).technologyType()).isEqualTo("tech-1");
} }
@Test
@Deprecated
void whenPropertiesGroupIsSetAdapterGroupReturnsIt() {
DynatraceProperties properties = new DynatraceProperties();
properties.setGroup("group-1");
assertThat(new DynatracePropertiesConfigAdapter(properties).group()).isEqualTo("group-1");
}
@Test @Test
void whenPropertiesV1GroupIsSetAdapterGroupReturnsIt() { void whenPropertiesV1GroupIsSetAdapterGroupReturnsIt() {
DynatraceProperties properties = new DynatraceProperties(); DynatraceProperties properties = new DynatraceProperties();
@ -90,14 +66,6 @@ class DynatracePropertiesConfigAdapterTests {
assertThat(new DynatracePropertiesConfigAdapter(properties).group()).isEqualTo("group-1"); assertThat(new DynatracePropertiesConfigAdapter(properties).group()).isEqualTo("group-1");
} }
@Test
@SuppressWarnings("deprecation")
void whenDeviceIdIsSetThenAdapterApiVersionIsV1() {
DynatraceProperties properties = new DynatraceProperties();
properties.setDeviceId("dev-1");
assertThat(new DynatracePropertiesConfigAdapter(properties).apiVersion()).isSameAs(DynatraceApiVersion.V1);
}
@Test @Test
void whenV1DeviceIdIsSetThenAdapterApiVersionIsV1() { void whenV1DeviceIdIsSetThenAdapterApiVersionIsV1() {
DynatraceProperties properties = new DynatraceProperties(); DynatraceProperties properties = new DynatraceProperties();
@ -144,7 +112,6 @@ class DynatracePropertiesConfigAdapterTests {
} }
@Test @Test
@SuppressWarnings("deprecation")
void defaultValues() { void defaultValues() {
DynatraceProperties properties = new DynatraceProperties(); DynatraceProperties properties = new DynatraceProperties();
assertThat(properties.getApiToken()).isNull(); assertThat(properties.getApiToken()).isNull();
@ -156,9 +123,6 @@ class DynatracePropertiesConfigAdapterTests {
assertThat(properties.getV2().isEnrichWithDynatraceMetadata()).isTrue(); assertThat(properties.getV2().isEnrichWithDynatraceMetadata()).isTrue();
assertThat(properties.getV2().getDefaultDimensions()).isNull(); assertThat(properties.getV2().getDefaultDimensions()).isNull();
assertThat(properties.getV2().isUseDynatraceSummaryInstruments()).isTrue(); assertThat(properties.getV2().isUseDynatraceSummaryInstruments()).isTrue();
assertThat(properties.getDeviceId()).isNull();
assertThat(properties.getTechnologyType()).isEqualTo("java");
assertThat(properties.getGroup()).isNull();
} }
} }

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2021 the original author or authors. * Copyright 2012-2022 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -30,13 +30,11 @@ import static org.assertj.core.api.Assertions.assertThat;
*/ */
class DynatracePropertiesTests extends StepRegistryPropertiesTests { class DynatracePropertiesTests extends StepRegistryPropertiesTests {
@SuppressWarnings("deprecation")
@Test @Test
void defaultValuesAreConsistent() { void defaultValuesAreConsistent() {
DynatraceProperties properties = new DynatraceProperties(); DynatraceProperties properties = new DynatraceProperties();
DynatraceConfig config = (key) -> null; DynatraceConfig config = (key) -> null;
assertStepRegistryDefaultValues(properties, config); assertStepRegistryDefaultValues(properties, config);
assertThat(properties.getTechnologyType()).isEqualTo(config.technologyType());
assertThat(properties.getV1().getTechnologyType()).isEqualTo(config.technologyType()); assertThat(properties.getV1().getTechnologyType()).isEqualTo(config.technologyType());
} }

@ -181,18 +181,6 @@ class PrometheusMetricsExportAutoConfigurationTests {
.isInstanceOf(DefaultHttpConnectionFactory.class))); .isInstanceOf(DefaultHttpConnectionFactory.class)));
} }
@Test
@Deprecated
void withCustomLegacyPushGatewayURL(CapturedOutput output) {
this.contextRunner.withConfiguration(AutoConfigurations.of(ManagementContextAutoConfiguration.class))
.withPropertyValues("management.prometheus.metrics.export.pushgateway.enabled=true",
"management.prometheus.metrics.export.pushgateway.base-url=localhost:9090")
.withUserConfiguration(BaseConfiguration.class).run((context) -> {
assertThat(output).contains("Invalid PushGateway base url").contains("localhost:9090");
hasGatewayURL(context, "http://localhost:9090/metrics/");
});
}
@Test @Test
void withCustomPushGatewayURL() { void withCustomPushGatewayURL() {
this.contextRunner.withConfiguration(AutoConfigurations.of(ManagementContextAutoConfiguration.class)) this.contextRunner.withConfiguration(AutoConfigurations.of(ManagementContextAutoConfiguration.class))

@ -114,17 +114,6 @@ class DataSourcePoolMetricsAutoConfigurationTests {
}); });
} }
@Test
@Deprecated
void autoConfiguredHikariDataSourceIsInstrumentedWhenUsingDeprecatedDataSourceInitialization() {
this.contextRunner.withPropertyValues("spring.datasource.schema:db/create-custom-schema.sql")
.withConfiguration(AutoConfigurations.of(DataSourceAutoConfiguration.class)).run((context) -> {
context.getBean(DataSource.class).getConnection();
MeterRegistry registry = context.getBean(MeterRegistry.class);
registry.get("hikaricp.connections").meter();
});
}
@Test @Test
void autoConfiguredHikariDataSourceIsInstrumentedWhenUsingDataSourceInitialization() { void autoConfiguredHikariDataSourceIsInstrumentedWhenUsingDataSourceInitialization() {
this.contextRunner.withPropertyValues("spring.sql.init.schema:db/create-custom-schema.sql").withConfiguration( this.contextRunner.withPropertyValues("spring.sql.init.schema:db/create-custom-schema.sql").withConfiguration(

@ -39,7 +39,7 @@ import static org.assertj.core.api.Assertions.assertThat;
* *
* @author Brian Clozel * @author Brian Clozel
*/ */
@SuppressWarnings("deprecation") @SuppressWarnings({ "deprecation", "removal" })
class ClientHttpObservationConventionAdapterTests { class ClientHttpObservationConventionAdapterTests {
private static final String TEST_METRIC_NAME = "test.metric.name"; private static final String TEST_METRIC_NAME = "test.metric.name";

@ -54,7 +54,7 @@ import static org.springframework.test.web.client.response.MockRestResponseCreat
* @author Brian Clozel * @author Brian Clozel
*/ */
@ExtendWith(OutputCaptureExtension.class) @ExtendWith(OutputCaptureExtension.class)
@SuppressWarnings("deprecation") @SuppressWarnings({ "deprecation", "removal" })
class RestTemplateObservationConfigurationTests { class RestTemplateObservationConfigurationTests {
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner().with(MetricsRun.simple()) private final ApplicationContextRunner contextRunner = new ApplicationContextRunner().with(MetricsRun.simple())
@ -161,6 +161,7 @@ class RestTemplateObservationConfigurationTests {
} }
@Deprecated(since = "3.0.0", forRemoval = true)
static class CustomTagsProvider implements RestTemplateExchangeTagsProvider { static class CustomTagsProvider implements RestTemplateExchangeTagsProvider {
@Override @Override

@ -48,18 +48,6 @@ public class HealthEndpoint extends HealthEndpointSupport<HealthContributor, Hea
private static final String[] EMPTY_PATH = {}; private static final String[] EMPTY_PATH = {};
/**
* Create a new {@link HealthEndpoint} instance.
* @param registry the health contributor registry
* @param groups the health endpoint groups
* @deprecated since 2.6.9 for removal in 3.0.0 in favor of
* {@link #HealthEndpoint(HealthContributorRegistry, HealthEndpointGroups, Duration)}
*/
@Deprecated
public HealthEndpoint(HealthContributorRegistry registry, HealthEndpointGroups groups) {
super(registry, groups, null);
}
/** /**
* Create a new {@link HealthEndpoint} instance. * Create a new {@link HealthEndpoint} instance.
* @param registry the health contributor registry * @param registry the health contributor registry

@ -50,18 +50,6 @@ public class HealthEndpointWebExtension extends HealthEndpointSupport<HealthCont
private static final String[] NO_PATH = {}; private static final String[] NO_PATH = {};
/**
* Create a new {@link HealthEndpointWebExtension} instance.
* @param registry the health contributor registry
* @param groups the health endpoint groups
* @deprecated since 2.6.9 for removal in 3.0.0 in favor of
* {@link #HealthEndpointWebExtension(HealthContributorRegistry, HealthEndpointGroups, Duration)}
*/
@Deprecated
public HealthEndpointWebExtension(HealthContributorRegistry registry, HealthEndpointGroups groups) {
super(registry, groups, null);
}
/** /**
* Create a new {@link HealthEndpointWebExtension} instance. * Create a new {@link HealthEndpointWebExtension} instance.
* @param registry the health contributor registry * @param registry the health contributor registry

@ -50,18 +50,6 @@ public class ReactiveHealthEndpointWebExtension
private static final String[] NO_PATH = {}; private static final String[] NO_PATH = {};
/**
* Create a new {@link ReactiveHealthEndpointWebExtension} instance.
* @param registry the health contributor registry
* @param groups the health endpoint groups
* @deprecated since 2.6.9 for removal in 3.0.0 in favor of
* {@link #ReactiveHealthEndpointWebExtension(ReactiveHealthContributorRegistry, HealthEndpointGroups, Duration)}
*/
@Deprecated
public ReactiveHealthEndpointWebExtension(ReactiveHealthContributorRegistry registry, HealthEndpointGroups groups) {
super(registry, groups, null);
}
/** /**
* Create a new {@link ReactiveHealthEndpointWebExtension} instance. * Create a new {@link ReactiveHealthEndpointWebExtension} instance.
* @param registry the health contributor registry * @param registry the health contributor registry

@ -166,7 +166,7 @@ public class PrometheusPushGatewayManager {
* Perform a POST before shutdown. * Perform a POST before shutdown.
* @deprecated since 3.0.0 for removal in 3.2.0 in favor of {@link #POST}. * @deprecated since 3.0.0 for removal in 3.2.0 in favor of {@link #POST}.
*/ */
@Deprecated @Deprecated(since = "3.0.0", forRemoval = true)
PUSH, PUSH,
/** /**

@ -34,7 +34,8 @@ import org.springframework.util.StringUtils;
* @deprecated since 3.0.0 for removal in 3.2.0 in favor of * @deprecated since 3.0.0 for removal in 3.2.0 in favor of
* {@link DefaultClientHttpObservationConvention} * {@link DefaultClientHttpObservationConvention}
*/ */
@Deprecated @Deprecated(since = "3.0.0", forRemoval = true)
@SuppressWarnings({ "deprecation", "removal" })
public class DefaultRestTemplateExchangeTagsProvider implements RestTemplateExchangeTagsProvider { public class DefaultRestTemplateExchangeTagsProvider implements RestTemplateExchangeTagsProvider {
@Override @Override

@ -41,7 +41,7 @@ import org.springframework.web.client.RestTemplate;
* @deprecated since 3.0.0 for removal in 3.2.0 in favor of * @deprecated since 3.0.0 for removal in 3.2.0 in favor of
* {@link DefaultClientHttpObservationConvention} * {@link DefaultClientHttpObservationConvention}
*/ */
@Deprecated @Deprecated(since = "3.0.0", forRemoval = true)
public final class RestTemplateExchangeTags { public final class RestTemplateExchangeTags {
private static final Pattern STRIP_URI_PATTERN = Pattern.compile("^https?://[^/]+/"); private static final Pattern STRIP_URI_PATTERN = Pattern.compile("^https?://[^/]+/");

@ -33,7 +33,7 @@ import org.springframework.web.client.RestTemplate;
* {@link ClientHttpObservationConvention} * {@link ClientHttpObservationConvention}
*/ */
@FunctionalInterface @FunctionalInterface
@Deprecated @Deprecated(since = "3.0.0", forRemoval = true)
public interface RestTemplateExchangeTagsProvider { public interface RestTemplateExchangeTagsProvider {
/** /**

@ -31,7 +31,7 @@ import org.springframework.web.reactive.function.client.ClientResponse;
* {@link org.springframework.web.reactive.function.client.ClientObservationConvention} * {@link org.springframework.web.reactive.function.client.ClientObservationConvention}
*/ */
@FunctionalInterface @FunctionalInterface
@Deprecated @Deprecated(since = "3.0.0", forRemoval = true)
public interface WebClientExchangeTagsProvider { public interface WebClientExchangeTagsProvider {
/** /**

@ -135,7 +135,8 @@ class PrometheusPushGatewayManagerTests {
} }
@Test @Test
@SuppressWarnings("deprecation") @SuppressWarnings("removal")
@Deprecated(since = "3.0.0", forRemoval = true)
void shutdownWhenShutdownOperationIsPushPerformsPushAddOnShutdown() throws Exception { void shutdownWhenShutdownOperationIsPushPerformsPushAddOnShutdown() throws Exception {
givenScheduleAtFixedRateWithReturnFuture(); givenScheduleAtFixedRateWithReturnFuture();
PrometheusPushGatewayManager manager = new PrometheusPushGatewayManager(this.pushGateway, this.registry, PrometheusPushGatewayManager manager = new PrometheusPushGatewayManager(this.pushGateway, this.registry,

@ -38,7 +38,8 @@ import static org.mockito.Mockito.mock;
* @author Nishant Raut * @author Nishant Raut
* @author Brian Clozel * @author Brian Clozel
*/ */
@SuppressWarnings("deprecation") @SuppressWarnings({ "removal" })
@Deprecated(since = "3.0.0", forRemoval = true)
class RestTemplateExchangeTagsTests { class RestTemplateExchangeTagsTests {
@Test @Test

@ -21,14 +21,6 @@ import javax.sql.DataSource;
import org.jooq.ConnectionProvider; import org.jooq.ConnectionProvider;
import org.jooq.DSLContext; import org.jooq.DSLContext;
import org.jooq.ExecuteListenerProvider; import org.jooq.ExecuteListenerProvider;
import org.jooq.ExecutorProvider;
import org.jooq.RecordListenerProvider;
import org.jooq.RecordMapperProvider;
import org.jooq.RecordUnmapperProvider;
import org.jooq.TransactionListenerProvider;
import org.jooq.TransactionProvider;
import org.jooq.VisitListenerProvider;
import org.jooq.conf.Settings;
import org.jooq.impl.DataSourceConnectionProvider; import org.jooq.impl.DataSourceConnectionProvider;
import org.jooq.impl.DefaultConfiguration; import org.jooq.impl.DefaultConfiguration;
import org.jooq.impl.DefaultDSLContext; import org.jooq.impl.DefaultDSLContext;
@ -45,7 +37,6 @@ import org.springframework.boot.autoconfigure.transaction.TransactionAutoConfigu
import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.core.Ordered;
import org.springframework.core.annotation.Order; import org.springframework.core.annotation.Order;
import org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy; import org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy;
import org.springframework.transaction.PlatformTransactionManager; import org.springframework.transaction.PlatformTransactionManager;
@ -104,50 +95,6 @@ public class JooqAutoConfiguration {
return configuration; return configuration;
} }
@Bean
@Deprecated
public DefaultConfigurationCustomizer jooqProvidersDefaultConfigurationCustomizer(
ObjectProvider<TransactionProvider> transactionProvider,
ObjectProvider<RecordMapperProvider> recordMapperProvider,
ObjectProvider<RecordUnmapperProvider> recordUnmapperProvider, ObjectProvider<Settings> settings,
ObjectProvider<RecordListenerProvider> recordListenerProviders,
ObjectProvider<VisitListenerProvider> visitListenerProviders,
ObjectProvider<TransactionListenerProvider> transactionListenerProviders,
ObjectProvider<ExecutorProvider> executorProvider) {
return new OrderedDefaultConfigurationCustomizer((configuration) -> {
transactionProvider.ifAvailable(configuration::set);
recordMapperProvider.ifAvailable(configuration::set);
recordUnmapperProvider.ifAvailable(configuration::set);
settings.ifAvailable(configuration::set);
executorProvider.ifAvailable(configuration::set);
configuration.set(recordListenerProviders.orderedStream().toArray(RecordListenerProvider[]::new));
configuration.set(visitListenerProviders.orderedStream().toArray(VisitListenerProvider[]::new));
configuration.setTransactionListenerProvider(
transactionListenerProviders.orderedStream().toArray(TransactionListenerProvider[]::new));
});
}
}
private static class OrderedDefaultConfigurationCustomizer implements DefaultConfigurationCustomizer, Ordered {
private final DefaultConfigurationCustomizer delegate;
OrderedDefaultConfigurationCustomizer(DefaultConfigurationCustomizer delegate) {
this.delegate = delegate;
}
@Override
public void customize(DefaultConfiguration configuration) {
this.delegate.customize(configuration);
}
@Override
public int getOrder() {
return 0;
}
} }
} }

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2020 the original author or authors. * Copyright 2012-2022 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -257,13 +257,13 @@ public class LiquibaseProperties {
this.labelFilter = labelFilter; this.labelFilter = labelFilter;
} }
@Deprecated @Deprecated(since = "3.0.0", forRemoval = true)
@DeprecatedConfigurationProperty(replacement = "spring.liquibase.label-filter") @DeprecatedConfigurationProperty(replacement = "spring.liquibase.label-filter")
public String getLabels() { public String getLabels() {
return getLabelFilter(); return getLabelFilter();
} }
@Deprecated @Deprecated(since = "3.0.0", forRemoval = true)
public void setLabels(String labels) { public void setLabels(String labels) {
setLabelFilter(labels); setLabelFilter(labels);
} }

@ -22,7 +22,6 @@ import java.time.Duration;
import java.util.List; import java.util.List;
import java.util.Locale; import java.util.Locale;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import java.util.function.Supplier;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import org.neo4j.driver.AuthToken; import org.neo4j.driver.AuthToken;
@ -72,17 +71,13 @@ public class Neo4jAutoConfiguration {
} }
URI determineServerUri(Neo4jProperties properties, Environment environment) { URI determineServerUri(Neo4jProperties properties, Environment environment) {
return getOrFallback(properties.getUri(), () -> { URI uri = properties.getUri();
URI deprecatedProperty = environment.getProperty("spring.data.neo4j.uri", URI.class); return (uri != null) ? uri : DEFAULT_SERVER_URI;
return (deprecatedProperty != null) ? deprecatedProperty : DEFAULT_SERVER_URI;
});
} }
AuthToken mapAuthToken(Neo4jProperties.Authentication authentication, Environment environment) { AuthToken mapAuthToken(Neo4jProperties.Authentication authentication, Environment environment) {
String username = getOrFallback(authentication.getUsername(), String username = authentication.getUsername();
() -> environment.getProperty("spring.data.neo4j.username", String.class)); String password = authentication.getPassword();
String password = getOrFallback(authentication.getPassword(),
() -> environment.getProperty("spring.data.neo4j.password", String.class));
String kerberosTicket = authentication.getKerberosTicket(); String kerberosTicket = authentication.getKerberosTicket();
String realm = authentication.getRealm(); String realm = authentication.getRealm();
@ -103,13 +98,6 @@ public class Neo4jAutoConfiguration {
return AuthTokens.none(); return AuthTokens.none();
} }
private <T> T getOrFallback(T value, Supplier<T> fallback) {
if (value != null) {
return value;
}
return fallback.get();
}
Config mapDriverConfig(Neo4jProperties properties, List<ConfigBuilderCustomizer> customizers) { Config mapDriverConfig(Neo4jProperties properties, List<ConfigBuilderCustomizer> customizers) {
Config.ConfigBuilder builder = Config.builder(); Config.ConfigBuilder builder = Config.builder();
configurePoolSettings(builder, properties.getPool()); configurePoolSettings(builder, properties.getPool());

@ -1400,13 +1400,13 @@ public class ServerProperties {
this.initialBufferSize = initialBufferSize; this.initialBufferSize = initialBufferSize;
} }
@Deprecated @Deprecated(since = "3.0.0", forRemoval = true)
@DeprecatedConfigurationProperty(reason = "Deprecated for removal in Reactor Netty") @DeprecatedConfigurationProperty(reason = "Deprecated for removal in Reactor Netty")
public DataSize getMaxChunkSize() { public DataSize getMaxChunkSize() {
return this.maxChunkSize; return this.maxChunkSize;
} }
@Deprecated @Deprecated(since = "3.0.0", forRemoval = true)
public void setMaxChunkSize(DataSize maxChunkSize) { public void setMaxChunkSize(DataSize maxChunkSize) {
this.maxChunkSize = maxChunkSize; this.maxChunkSize = maxChunkSize;
} }

@ -102,7 +102,7 @@ public class NettyWebServerFactoryCustomizer
})); }));
} }
@SuppressWarnings("deprecation") @SuppressWarnings({ "deprecation", "removal" })
private void maxChunkSize(PropertyMapper propertyMapper, HttpRequestDecoderSpec httpRequestDecoderSpec, private void maxChunkSize(PropertyMapper propertyMapper, HttpRequestDecoderSpec httpRequestDecoderSpec,
ServerProperties.Netty nettyProperties) { ServerProperties.Netty nettyProperties) {
propertyMapper.from(nettyProperties.getMaxChunkSize()).whenNonNull() propertyMapper.from(nettyProperties.getMaxChunkSize()).whenNonNull()

@ -175,7 +175,6 @@ public class WebMvcAutoConfiguration {
// Defined as a nested config to ensure WebMvcConfigurer is not read when not // Defined as a nested config to ensure WebMvcConfigurer is not read when not
// on the classpath // on the classpath
@SuppressWarnings("deprecation")
@Configuration(proxyBeanMethods = false) @Configuration(proxyBeanMethods = false)
@Import(EnableWebMvcConfiguration.class) @Import(EnableWebMvcConfiguration.class)
@EnableConfigurationProperties({ WebMvcProperties.class, WebProperties.class }) @EnableConfigurationProperties({ WebMvcProperties.class, WebProperties.class })
@ -212,7 +211,6 @@ public class WebMvcAutoConfiguration {
this.resourceHandlerRegistrationCustomizer = resourceHandlerRegistrationCustomizerProvider.getIfAvailable(); this.resourceHandlerRegistrationCustomizer = resourceHandlerRegistrationCustomizerProvider.getIfAvailable();
this.dispatcherServletPath = dispatcherServletPath; this.dispatcherServletPath = dispatcherServletPath;
this.servletRegistrations = servletRegistrations; this.servletRegistrations = servletRegistrations;
this.mvcProperties.checkConfiguration();
} }
@Override @Override
@ -246,9 +244,6 @@ public class WebMvcAutoConfiguration {
if (this.mvcProperties.getPathmatch() if (this.mvcProperties.getPathmatch()
.getMatchingStrategy() == WebMvcProperties.MatchingStrategy.ANT_PATH_MATCHER) { .getMatchingStrategy() == WebMvcProperties.MatchingStrategy.ANT_PATH_MATCHER) {
configurer.setPathMatcher(new AntPathMatcher()); configurer.setPathMatcher(new AntPathMatcher());
configurer.setUseSuffixPatternMatch(this.mvcProperties.getPathmatch().isUseSuffixPattern());
configurer.setUseRegisteredSuffixPatternMatch(
this.mvcProperties.getPathmatch().isUseRegisteredSuffixPattern());
this.dispatcherServletPath.ifAvailable((dispatcherPath) -> { this.dispatcherServletPath.ifAvailable((dispatcherPath) -> {
String servletUrlMapping = dispatcherPath.getServletUrlMapping(); String servletUrlMapping = dispatcherPath.getServletUrlMapping();
if (servletUrlMapping.equals("/") && singleDispatcherServlet()) { if (servletUrlMapping.equals("/") && singleDispatcherServlet()) {
@ -268,7 +263,6 @@ public class WebMvcAutoConfiguration {
@Override @Override
public void configureContentNegotiation(ContentNegotiationConfigurer configurer) { public void configureContentNegotiation(ContentNegotiationConfigurer configurer) {
WebMvcProperties.Contentnegotiation contentnegotiation = this.mvcProperties.getContentnegotiation(); WebMvcProperties.Contentnegotiation contentnegotiation = this.mvcProperties.getContentnegotiation();
configurer.favorPathExtension(contentnegotiation.isFavorPathExtension());
configurer.favorParameter(contentnegotiation.isFavorParameter()); configurer.favorParameter(contentnegotiation.isFavorParameter());
if (contentnegotiation.getParameterName() != null) { if (contentnegotiation.getParameterName() != null) {
configurer.parameterName(contentnegotiation.getParameterName()); configurer.parameterName(contentnegotiation.getParameterName());
@ -417,7 +411,7 @@ public class WebMvcAutoConfiguration {
return adapter; return adapter;
} }
@SuppressWarnings("deprecation") @SuppressWarnings({ "deprecation", "removal" })
private void setIgnoreDefaultModelOnRedirect(RequestMappingHandlerAdapter adapter) { private void setIgnoreDefaultModelOnRedirect(RequestMappingHandlerAdapter adapter) {
adapter.setIgnoreDefaultModelOnRedirect( adapter.setIgnoreDefaultModelOnRedirect(
this.mvcProperties == null || this.mvcProperties.isIgnoreDefaultModelOnRedirect()); this.mvcProperties == null || this.mvcProperties.isIgnoreDefaultModelOnRedirect());
@ -460,7 +454,7 @@ public class WebMvcAutoConfiguration {
@Override @Override
@Bean @Bean
@ConditionalOnMissingBean(name = DispatcherServlet.THEME_RESOLVER_BEAN_NAME) @ConditionalOnMissingBean(name = DispatcherServlet.THEME_RESOLVER_BEAN_NAME)
@Deprecated @Deprecated(since = "3.0.0", forRemoval = false)
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
public org.springframework.web.servlet.ThemeResolver themeResolver() { public org.springframework.web.servlet.ThemeResolver themeResolver() {
return super.themeResolver(); return super.themeResolver();

@ -22,7 +22,6 @@ import java.util.Map;
import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.DeprecatedConfigurationProperty; import org.springframework.boot.context.properties.DeprecatedConfigurationProperty;
import org.springframework.boot.context.properties.IncompatibleConfigurationException;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.util.Assert; import org.springframework.util.Assert;
import org.springframework.validation.DefaultMessageCodesResolver; import org.springframework.validation.DefaultMessageCodesResolver;
@ -115,28 +114,17 @@ public class WebMvcProperties {
this.messageCodesResolverFormat = messageCodesResolverFormat; this.messageCodesResolverFormat = messageCodesResolverFormat;
} }
@Deprecated
@DeprecatedConfigurationProperty(replacement = "spring.mvc.format.date")
public String getDateFormat() {
return this.format.getDate();
}
@Deprecated
public void setDateFormat(String dateFormat) {
this.format.setDate(dateFormat);
}
public Format getFormat() { public Format getFormat() {
return this.format; return this.format;
} }
@Deprecated @Deprecated(since = "3.0.0", forRemoval = true)
@DeprecatedConfigurationProperty(reason = "Deprecated for removal in Spring MVC") @DeprecatedConfigurationProperty(reason = "Deprecated for removal in Spring MVC")
public boolean isIgnoreDefaultModelOnRedirect() { public boolean isIgnoreDefaultModelOnRedirect() {
return this.ignoreDefaultModelOnRedirect; return this.ignoreDefaultModelOnRedirect;
} }
@Deprecated @Deprecated(since = "3.0.0", forRemoval = true)
public void setIgnoreDefaultModelOnRedirect(boolean ignoreDefaultModelOnRedirect) { public void setIgnoreDefaultModelOnRedirect(boolean ignoreDefaultModelOnRedirect) {
this.ignoreDefaultModelOnRedirect = ignoreDefaultModelOnRedirect; this.ignoreDefaultModelOnRedirect = ignoreDefaultModelOnRedirect;
} }
@ -225,19 +213,6 @@ public class WebMvcProperties {
return this.pathmatch; return this.pathmatch;
} }
public void checkConfiguration() {
if (this.getPathmatch().getMatchingStrategy() == MatchingStrategy.PATH_PATTERN_PARSER) {
if (this.getPathmatch().isUseSuffixPattern()) {
throw new IncompatibleConfigurationException("spring.mvc.pathmatch.matching-strategy",
"spring.mvc.pathmatch.use-suffix-pattern");
}
if (this.getPathmatch().isUseRegisteredSuffixPattern()) {
throw new IncompatibleConfigurationException("spring.mvc.pathmatch.matching-strategy",
"spring.mvc.pathmatch.use-registered-suffix-pattern");
}
}
}
public static class Async { public static class Async {
/** /**
@ -351,13 +326,6 @@ public class WebMvcProperties {
public static class Contentnegotiation { public static class Contentnegotiation {
/**
* Whether the path extension in the URL path should be used to determine the
* requested media type. If enabled a request "/users.pdf" will be interpreted as
* a request for "application/pdf" regardless of the 'Accept' header.
*/
private boolean favorPathExtension = false;
/** /**
* Whether a request parameter ("format" by default) should be used to determine * Whether a request parameter ("format" by default) should be used to determine
* the requested media type. * the requested media type.
@ -375,18 +343,6 @@ public class WebMvcProperties {
*/ */
private String parameterName; private String parameterName;
@DeprecatedConfigurationProperty(
reason = "Use of path extensions for request mapping and for content negotiation is discouraged.")
@Deprecated
public boolean isFavorPathExtension() {
return this.favorPathExtension;
}
@Deprecated
public void setFavorPathExtension(boolean favorPathExtension) {
this.favorPathExtension = favorPathExtension;
}
public boolean isFavorParameter() { public boolean isFavorParameter() {
return this.favorParameter; return this.favorParameter;
} }
@ -420,22 +376,6 @@ public class WebMvcProperties {
*/ */
private MatchingStrategy matchingStrategy = MatchingStrategy.PATH_PATTERN_PARSER; private MatchingStrategy matchingStrategy = MatchingStrategy.PATH_PATTERN_PARSER;
/**
* Whether to use suffix pattern match (".*") when matching patterns to requests.
* If enabled a method mapped to "/users" also matches to "/users.*". Enabling
* this option is not compatible with the PathPatternParser matching strategy.
*/
private boolean useSuffixPattern = false;
/**
* Whether suffix pattern matching should work only against extensions registered
* with "spring.mvc.contentnegotiation.media-types.*". This is generally
* recommended to reduce ambiguity and to avoid issues such as when a "." appears
* in the path for other reasons. Enabling this option is not compatible with the
* PathPatternParser matching strategy.
*/
private boolean useRegisteredSuffixPattern = false;
public MatchingStrategy getMatchingStrategy() { public MatchingStrategy getMatchingStrategy() {
return this.matchingStrategy; return this.matchingStrategy;
} }
@ -444,30 +384,6 @@ public class WebMvcProperties {
this.matchingStrategy = matchingStrategy; this.matchingStrategy = matchingStrategy;
} }
@DeprecatedConfigurationProperty(
reason = "Use of path extensions for request mapping and for content negotiation is discouraged.")
@Deprecated
public boolean isUseSuffixPattern() {
return this.useSuffixPattern;
}
@Deprecated
public void setUseSuffixPattern(boolean useSuffixPattern) {
this.useSuffixPattern = useSuffixPattern;
}
@DeprecatedConfigurationProperty(
reason = "Use of path extensions for request mapping and for content negotiation is discouraged.")
@Deprecated
public boolean isUseRegisteredSuffixPattern() {
return this.useRegisteredSuffixPattern;
}
@Deprecated
public void setUseRegisteredSuffixPattern(boolean useRegisteredSuffixPattern) {
this.useRegisteredSuffixPattern = useRegisteredSuffixPattern;
}
} }
public static class Format { public static class Format {

@ -1034,7 +1034,7 @@
"description": "Login password of the server.", "description": "Login password of the server.",
"deprecation": { "deprecation": {
"replacement": "spring.neo4j.authentication.password", "replacement": "spring.neo4j.authentication.password",
"level": "warning" "level": "error"
} }
}, },
{ {
@ -1059,7 +1059,7 @@
"description": "URI used by the driver. Auto-detected by default.", "description": "URI used by the driver. Auto-detected by default.",
"deprecation": { "deprecation": {
"replacement": "spring.neo4j.uri", "replacement": "spring.neo4j.uri",
"level": "warning" "level": "error"
} }
}, },
{ {
@ -1077,7 +1077,7 @@
"description": "Login user of the server.", "description": "Login user of the server.",
"deprecation": { "deprecation": {
"replacement": "spring.neo4j.authentication.username", "replacement": "spring.neo4j.authentication.username",
"level": "warning" "level": "error"
} }
}, },
{ {
@ -2047,6 +2047,14 @@
"type": "java.lang.String", "type": "java.lang.String",
"description": "Preferred JSON mapper to use for HTTP message conversion. By default, auto-detected according to the environment." "description": "Preferred JSON mapper to use for HTTP message conversion. By default, auto-detected according to the environment."
}, },
{
"name": "spring.mvc.date-format",
"type": "java.lang.String",
"description": "Date format to use, for example 'dd/MM/yyyy'.",
"deprecation": {
"level": "error"
}
},
{ {
"name": "spring.mvc.favicon.enabled", "name": "spring.mvc.favicon.enabled",
"type": "java.lang.Boolean", "type": "java.lang.Boolean",

@ -24,14 +24,8 @@ import org.jooq.ConverterProvider;
import org.jooq.DSLContext; import org.jooq.DSLContext;
import org.jooq.ExecuteListener; import org.jooq.ExecuteListener;
import org.jooq.ExecuteListenerProvider; import org.jooq.ExecuteListenerProvider;
import org.jooq.ExecutorProvider;
import org.jooq.RecordListenerProvider;
import org.jooq.RecordMapperProvider;
import org.jooq.RecordUnmapperProvider;
import org.jooq.SQLDialect; import org.jooq.SQLDialect;
import org.jooq.TransactionListenerProvider;
import org.jooq.TransactionalRunnable; import org.jooq.TransactionalRunnable;
import org.jooq.VisitListenerProvider;
import org.jooq.impl.DataSourceConnectionProvider; import org.jooq.impl.DataSourceConnectionProvider;
import org.jooq.impl.DefaultExecuteListenerProvider; import org.jooq.impl.DefaultExecuteListenerProvider;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
@ -153,33 +147,6 @@ class JooqAutoConfigurationTests {
}); });
} }
@Test
@Deprecated
void customProvidersArePickedUp() {
RecordMapperProvider recordMapperProvider = mock(RecordMapperProvider.class);
RecordUnmapperProvider recordUnmapperProvider = mock(RecordUnmapperProvider.class);
RecordListenerProvider recordListenerProvider = mock(RecordListenerProvider.class);
VisitListenerProvider visitListenerProvider = mock(VisitListenerProvider.class);
TransactionListenerProvider transactionListenerProvider = mock(TransactionListenerProvider.class);
ExecutorProvider executorProvider = mock(ExecutorProvider.class);
this.contextRunner.withUserConfiguration(JooqDataSourceConfiguration.class, TxManagerConfiguration.class)
.withBean(RecordMapperProvider.class, () -> recordMapperProvider)
.withBean(RecordUnmapperProvider.class, () -> recordUnmapperProvider)
.withBean(RecordListenerProvider.class, () -> recordListenerProvider)
.withBean(VisitListenerProvider.class, () -> visitListenerProvider)
.withBean(TransactionListenerProvider.class, () -> transactionListenerProvider)
.withBean(ExecutorProvider.class, () -> executorProvider).run((context) -> {
DSLContext dsl = context.getBean(DSLContext.class);
assertThat(dsl.configuration().recordMapperProvider()).isSameAs(recordMapperProvider);
assertThat(dsl.configuration().recordUnmapperProvider()).isSameAs(recordUnmapperProvider);
assertThat(dsl.configuration().executorProvider()).isSameAs(executorProvider);
assertThat(dsl.configuration().recordListenerProviders()).containsExactly(recordListenerProvider);
assertThat(dsl.configuration().visitListenerProviders()).containsExactly(visitListenerProvider);
assertThat(dsl.configuration().transactionListenerProviders())
.containsExactly(transactionListenerProvider);
});
}
@Test @Test
void relaxedBindingOfSqlDialect() { void relaxedBindingOfSqlDialect() {
this.contextRunner.withUserConfiguration(JooqDataSourceConfiguration.class) this.contextRunner.withUserConfiguration(JooqDataSourceConfiguration.class)

@ -303,7 +303,7 @@ class LiquibaseAutoConfigurationTests {
} }
@Test @Test
@Deprecated @Deprecated(since = "3.0.0", forRemoval = true)
void overrideLabelFilterWithDeprecatedLabelsProperty() { void overrideLabelFilterWithDeprecatedLabelsProperty() {
this.contextRunner.withUserConfiguration(EmbeddedDataSourceConfiguration.class) this.contextRunner.withUserConfiguration(EmbeddedDataSourceConfiguration.class)
.withPropertyValues("spring.liquibase.labels:test, production").run(assertLiquibase( .withPropertyValues("spring.liquibase.labels:test, production").run(assertLiquibase(

@ -131,26 +131,6 @@ class Neo4jAutoConfigurationTests {
assertThat(determineServerUri(properties, new MockEnvironment())).isEqualTo(customUri); assertThat(determineServerUri(properties, new MockEnvironment())).isEqualTo(customUri);
} }
@Test
@Deprecated
void determineServerUriWithDeprecatedPropertyShouldOverrideDefault() {
URI customUri = URI.create("bolt://localhost:4242");
MockEnvironment environment = new MockEnvironment().withProperty("spring.data.neo4j.uri", customUri.toString());
assertThat(determineServerUri(new Neo4jProperties(), environment)).isEqualTo(customUri);
}
@Test
@Deprecated
void determineServerUriWithCustomUriShouldTakePrecedenceOverDeprecatedProperty() {
URI customUri = URI.create("bolt://localhost:4242");
URI anotherCustomURI = URI.create("bolt://localhost:2424");
Neo4jProperties properties = new Neo4jProperties();
properties.setUri(customUri);
MockEnvironment environment = new MockEnvironment().withProperty("spring.data.neo4j.uri",
anotherCustomURI.toString());
assertThat(determineServerUri(properties, environment)).isEqualTo(customUri);
}
@Test @Test
void authenticationShouldDefaultToNone() { void authenticationShouldDefaultToNone() {
assertThat(mapAuthToken(new Authentication())).isEqualTo(AuthTokens.none()); assertThat(mapAuthToken(new Authentication())).isEqualTo(AuthTokens.none());
@ -173,25 +153,6 @@ class Neo4jAutoConfigurationTests {
assertThat(mapAuthToken(authentication)).isEqualTo(AuthTokens.basic("Farin", "Urlaub", "Test Realm")); assertThat(mapAuthToken(authentication)).isEqualTo(AuthTokens.basic("Farin", "Urlaub", "Test Realm"));
} }
@Test
@Deprecated
void authenticationWithUsernameUsingDeprecatedPropertiesShouldEnableBasicAuth() {
MockEnvironment environment = new MockEnvironment().withProperty("spring.data.neo4j.username", "user")
.withProperty("spring.data.neo4j.password", "secret");
assertThat(mapAuthToken(new Authentication(), environment)).isEqualTo(AuthTokens.basic("user", "secret"));
}
@Test
@Deprecated
void authenticationWithUsernameShouldTakePrecedenceOverDeprecatedPropertiesAndEnableBasicAuth() {
MockEnvironment environment = new MockEnvironment().withProperty("spring.data.neo4j.username", "user")
.withProperty("spring.data.neo4j.password", "secret");
Authentication authentication = new Authentication();
authentication.setUsername("Farin");
authentication.setPassword("Urlaub");
assertThat(mapAuthToken(authentication, environment)).isEqualTo(AuthTokens.basic("Farin", "Urlaub"));
}
@Test @Test
void authenticationWithKerberosTicketShouldEnableKerberos() { void authenticationWithKerberosTicketShouldEnableKerberos() {
Authentication authentication = new Authentication(); Authentication authentication = new Authentication();

@ -516,7 +516,8 @@ class ServerPropertiesTests {
} }
@Test @Test
@SuppressWarnings("deprecation") @Deprecated(since = "3.0.0", forRemoval = true)
@SuppressWarnings("removal")
void nettyMaxChunkSizeMatchesHttpDecoderSpecDefault() { void nettyMaxChunkSizeMatchesHttpDecoderSpecDefault() {
assertThat(this.properties.getNetty().getMaxChunkSize().toBytes()) assertThat(this.properties.getNetty().getMaxChunkSize().toBytes())
.isEqualTo(HttpDecoderSpec.DEFAULT_MAX_CHUNK_SIZE); .isEqualTo(HttpDecoderSpec.DEFAULT_MAX_CHUNK_SIZE);

@ -147,12 +147,12 @@ class NettyWebServerFactoryCustomizerTests {
assertThat(decoder.maxInitialLineLength()).isEqualTo(nettyProperties.getMaxInitialLineLength().toBytes()); assertThat(decoder.maxInitialLineLength()).isEqualTo(nettyProperties.getMaxInitialLineLength().toBytes());
} }
@SuppressWarnings("deprecation") @SuppressWarnings("removal")
private void setMaxChunkSize(ServerProperties.Netty nettyProperties) { private void setMaxChunkSize(ServerProperties.Netty nettyProperties) {
nettyProperties.setMaxChunkSize(DataSize.ofKilobytes(16)); nettyProperties.setMaxChunkSize(DataSize.ofKilobytes(16));
} }
@SuppressWarnings("deprecation") @SuppressWarnings({ "deprecation", "removal" })
private void assertMaxChunkSize(ServerProperties.Netty nettyProperties, HttpRequestDecoderSpec decoder) { private void assertMaxChunkSize(ServerProperties.Netty nettyProperties, HttpRequestDecoderSpec decoder) {
assertThat(decoder.maxChunkSize()).isEqualTo(nettyProperties.getMaxChunkSize().toBytes()); assertThat(decoder.maxChunkSize()).isEqualTo(nettyProperties.getMaxChunkSize().toBytes());
} }

@ -46,7 +46,6 @@ import org.springframework.boot.autoconfigure.task.TaskExecutionAutoConfiguratio
import org.springframework.boot.autoconfigure.validation.ValidationAutoConfiguration; import org.springframework.boot.autoconfigure.validation.ValidationAutoConfiguration;
import org.springframework.boot.autoconfigure.validation.ValidatorAdapter; import org.springframework.boot.autoconfigure.validation.ValidatorAdapter;
import org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration.WebMvcAutoConfigurationAdapter; import org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration.WebMvcAutoConfigurationAdapter;
import org.springframework.boot.context.properties.IncompatibleConfigurationException;
import org.springframework.boot.test.context.assertj.AssertableWebApplicationContext; import org.springframework.boot.test.context.assertj.AssertableWebApplicationContext;
import org.springframework.boot.test.context.runner.ContextConsumer; import org.springframework.boot.test.context.runner.ContextConsumer;
import org.springframework.boot.test.context.runner.WebApplicationContextRunner; import org.springframework.boot.test.context.runner.WebApplicationContextRunner;
@ -70,7 +69,6 @@ import org.springframework.format.Printer;
import org.springframework.format.support.FormattingConversionService; import org.springframework.format.support.FormattingConversionService;
import org.springframework.http.CacheControl; import org.springframework.http.CacheControl;
import org.springframework.http.HttpHeaders; import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.http.converter.HttpMessageConverter; import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.mock.web.MockHttpServletRequest; import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.test.util.ReflectionTestUtils; import org.springframework.test.util.ReflectionTestUtils;
@ -78,10 +76,8 @@ import org.springframework.util.StringUtils;
import org.springframework.validation.Validator; import org.springframework.validation.Validator;
import org.springframework.validation.beanvalidation.LocalValidatorFactoryBean; import org.springframework.validation.beanvalidation.LocalValidatorFactoryBean;
import org.springframework.web.accept.ContentNegotiationManager; import org.springframework.web.accept.ContentNegotiationManager;
import org.springframework.web.accept.ContentNegotiationStrategy;
import org.springframework.web.accept.ParameterContentNegotiationStrategy; import org.springframework.web.accept.ParameterContentNegotiationStrategy;
import org.springframework.web.bind.support.ConfigurableWebBindingInitializer; import org.springframework.web.bind.support.ConfigurableWebBindingInitializer;
import org.springframework.web.context.request.ServletWebRequest;
import org.springframework.web.context.support.AnnotationConfigWebApplicationContext; import org.springframework.web.context.support.AnnotationConfigWebApplicationContext;
import org.springframework.web.cors.UrlBasedCorsConfigurationSource; import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
import org.springframework.web.filter.FormContentFilter; import org.springframework.web.filter.FormContentFilter;
@ -371,7 +367,7 @@ class WebMvcAutoConfigurationTests {
} }
@Test @Test
@Deprecated @Deprecated(since = "3.0.0", forRemoval = true)
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
void customThemeResolverWithMatchingNameReplacesDefaultThemeResolver() { void customThemeResolverWithMatchingNameReplacesDefaultThemeResolver() {
this.contextRunner.withBean("themeResolver", CustomThemeResolver.class, CustomThemeResolver::new) this.contextRunner.withBean("themeResolver", CustomThemeResolver.class, CustomThemeResolver::new)
@ -382,7 +378,7 @@ class WebMvcAutoConfigurationTests {
} }
@Test @Test
@Deprecated @Deprecated(since = "3.0.0", forRemoval = true)
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
void customThemeResolverWithDifferentNameDoesNotReplaceDefaultThemeResolver() { void customThemeResolverWithDifferentNameDoesNotReplaceDefaultThemeResolver() {
this.contextRunner.withBean("customThemeResolver", CustomThemeResolver.class, CustomThemeResolver::new) this.contextRunner.withBean("customThemeResolver", CustomThemeResolver.class, CustomThemeResolver::new)
@ -430,15 +426,6 @@ class WebMvcAutoConfigurationTests {
}); });
} }
@Test
void customDateFormatWithDeprecatedProperty() {
this.contextRunner.withPropertyValues("spring.mvc.date-format:dd*MM*yyyy").run((context) -> {
FormattingConversionService conversionService = context.getBean(FormattingConversionService.class);
Date date = Date.from(ZonedDateTime.of(1988, 6, 25, 20, 30, 0, 0, ZoneId.systemDefault()).toInstant());
assertThat(conversionService.convert(date, String.class)).isEqualTo("25*06*1988");
});
}
@Test @Test
void defaultTimeFormat() { void defaultTimeFormat() {
this.contextRunner.run((context) -> { this.contextRunner.run((context) -> {
@ -570,10 +557,9 @@ class WebMvcAutoConfigurationTests {
} }
@Test @Test
@Deprecated
void customMediaTypes() { void customMediaTypes() {
this.contextRunner.withPropertyValues("spring.mvc.contentnegotiation.media-types.yaml:text/yaml", this.contextRunner.withPropertyValues("spring.mvc.contentnegotiation.media-types.yaml:text/yaml")
"spring.mvc.contentnegotiation.favor-path-extension:true").run((context) -> { .run((context) -> {
RequestMappingHandlerAdapter adapter = context.getBean(RequestMappingHandlerAdapter.class); RequestMappingHandlerAdapter adapter = context.getBean(RequestMappingHandlerAdapter.class);
ContentNegotiationManager contentNegotiationManager = (ContentNegotiationManager) ReflectionTestUtils ContentNegotiationManager contentNegotiationManager = (ContentNegotiationManager) ReflectionTestUtils
.getField(adapter, "contentNegotiationManager"); .getField(adapter, "contentNegotiationManager");
@ -841,29 +827,6 @@ class WebMvcAutoConfigurationTests {
})); }));
} }
@Test
@SuppressWarnings("deprecation")
void defaultPathMatching() {
this.contextRunner.run((context) -> {
RequestMappingHandlerMapping handlerMapping = context.getBean(RequestMappingHandlerMapping.class);
assertThat(handlerMapping.useSuffixPatternMatch()).isFalse();
assertThat(handlerMapping.useRegisteredSuffixPatternMatch()).isFalse();
});
}
@Test
@Deprecated
@SuppressWarnings("deprecation")
void useSuffixPatternMatch() {
this.contextRunner.withPropertyValues("spring.mvc.pathmatch.matching-strategy=ant-path-matcher",
"spring.mvc.pathmatch.use-suffix-pattern:true",
"spring.mvc.pathmatch.use-registered-suffix-pattern:true").run((context) -> {
RequestMappingHandlerMapping handlerMapping = context.getBean(RequestMappingHandlerMapping.class);
assertThat(handlerMapping.useSuffixPatternMatch()).isTrue();
assertThat(handlerMapping.useRegisteredSuffixPatternMatch()).isTrue();
});
}
@Test @Test
void usePathPatternParser() { void usePathPatternParser() {
this.contextRunner.withPropertyValues("spring.mvc.pathmatch.matching-strategy:path_pattern_parser") this.contextRunner.withPropertyValues("spring.mvc.pathmatch.matching-strategy:path_pattern_parser")
@ -873,15 +836,6 @@ class WebMvcAutoConfigurationTests {
}); });
} }
@Test
void incompatiblePathMatchingConfiguration() {
this.contextRunner
.withPropertyValues("spring.mvc.pathmatch.matching-strategy:path_pattern_parser",
"spring.mvc.pathmatch.use-suffix-pattern:true")
.run((context) -> assertThat(context.getStartupFailure()).rootCause()
.isInstanceOf(IncompatibleConfigurationException.class));
}
@Test @Test
void defaultContentNegotiation() { void defaultContentNegotiation() {
this.contextRunner.run((context) -> { this.contextRunner.run((context) -> {
@ -893,19 +847,6 @@ class WebMvcAutoConfigurationTests {
} }
@Test @Test
@Deprecated
void pathExtensionContentNegotiation() {
this.contextRunner.withPropertyValues("spring.mvc.contentnegotiation.favor-path-extension:true")
.run((context) -> {
RequestMappingHandlerMapping handlerMapping = context.getBean(RequestMappingHandlerMapping.class);
ContentNegotiationManager contentNegotiationManager = handlerMapping.getContentNegotiationManager();
assertThat(contentNegotiationManager.getStrategies()).hasAtLeastOneElementOfType(
WebMvcAutoConfiguration.OptionalPathExtensionContentNegotiationStrategy.class);
});
}
@Test
@Deprecated
void queryParameterContentNegotiation() { void queryParameterContentNegotiation() {
this.contextRunner.withPropertyValues("spring.mvc.contentnegotiation.favor-parameter:true").run((context) -> { this.contextRunner.withPropertyValues("spring.mvc.contentnegotiation.favor-parameter:true").run((context) -> {
RequestMappingHandlerMapping handlerMapping = context.getBean(RequestMappingHandlerMapping.class); RequestMappingHandlerMapping handlerMapping = context.getBean(RequestMappingHandlerMapping.class);
@ -925,21 +866,6 @@ class WebMvcAutoConfigurationTests {
}); });
} }
@Test
@SuppressWarnings("deprecation")
void contentNegotiationStrategySkipsPathExtension() throws Exception {
ContentNegotiationStrategy delegate = mock(ContentNegotiationStrategy.class);
ContentNegotiationStrategy strategy = new WebMvcAutoConfiguration.OptionalPathExtensionContentNegotiationStrategy(
delegate);
MockHttpServletRequest request = new MockHttpServletRequest();
request.setAttribute(
org.springframework.web.accept.PathExtensionContentNegotiationStrategy.class.getName() + ".SKIP",
Boolean.TRUE);
ServletWebRequest webRequest = new ServletWebRequest(request);
List<MediaType> mediaTypes = strategy.resolveMediaTypes(webRequest);
assertThat(mediaTypes).containsOnly(MediaType.ALL);
}
@Test @Test
void requestContextFilterIsAutoConfigured() { void requestContextFilterIsAutoConfigured() {
this.contextRunner.run((context) -> assertThat(context).hasSingleBean(RequestContextFilter.class)); this.contextRunner.run((context) -> assertThat(context).hasSingleBean(RequestContextFilter.class));
@ -1485,7 +1411,7 @@ class WebMvcAutoConfigurationTests {
} }
@Deprecated @Deprecated(since = "3.0.0", forRemoval = true)
static class CustomThemeResolver implements org.springframework.web.servlet.ThemeResolver { static class CustomThemeResolver implements org.springframework.web.servlet.ThemeResolver {
@Override @Override

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2021 the original author or authors. * Copyright 2012-2022 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -22,7 +22,6 @@ import java.util.Map;
import org.assertj.core.util.Throwables; import org.assertj.core.util.Throwables;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.context.properties.IncompatibleConfigurationException;
import org.springframework.boot.context.properties.bind.BindException; import org.springframework.boot.context.properties.bind.BindException;
import org.springframework.boot.context.properties.bind.Bindable; import org.springframework.boot.context.properties.bind.Bindable;
import org.springframework.boot.context.properties.bind.Binder; import org.springframework.boot.context.properties.bind.Binder;
@ -62,24 +61,6 @@ class WebMvcPropertiesTests {
(ex) -> assertThat(Throwables.getRootCause(ex)).hasMessage("Path must not contain wildcards")); (ex) -> assertThat(Throwables.getRootCause(ex)).hasMessage("Path must not contain wildcards"));
} }
@Test
@SuppressWarnings("deprecation")
void incompatiblePathMatchSuffixConfig() {
this.properties.getPathmatch().setMatchingStrategy(WebMvcProperties.MatchingStrategy.PATH_PATTERN_PARSER);
this.properties.getPathmatch().setUseSuffixPattern(true);
assertThatExceptionOfType(IncompatibleConfigurationException.class)
.isThrownBy(this.properties::checkConfiguration);
}
@Test
@SuppressWarnings("deprecation")
void incompatiblePathMatchRegisteredSuffixConfig() {
this.properties.getPathmatch().setMatchingStrategy(WebMvcProperties.MatchingStrategy.PATH_PATTERN_PARSER);
this.properties.getPathmatch().setUseRegisteredSuffixPattern(true);
assertThatExceptionOfType(IncompatibleConfigurationException.class)
.isThrownBy(this.properties::checkConfiguration);
}
private void bind(String name, String value) { private void bind(String name, String value) {
bind(Collections.singletonMap(name, value)); bind(Collections.singletonMap(name, value));
} }

@ -231,31 +231,6 @@ Most standard media types are supported out-of-the-box, but you can also define
Suffix pattern matching is deprecated and will be removed in a future release.
If you understand the caveats and would still like your application to use suffix pattern matching, the following configuration is required:
[source,yaml,indent=0,subs="verbatim",configblocks]
----
spring:
mvc:
contentnegotiation:
favor-path-extension: true
pathmatch:
use-suffix-pattern: true
----
Alternatively, rather than open all suffix patterns, it is more secure to only support registered suffix patterns:
[source,yaml,indent=0,subs="verbatim",configblocks]
----
spring:
mvc:
contentnegotiation:
favor-path-extension: true
pathmatch:
use-registered-suffix-pattern: true
----
As of Spring Framework 5.3, Spring MVC supports several implementation strategies for matching request paths to Controller handlers. As of Spring Framework 5.3, Spring MVC supports several implementation strategies for matching request paths to Controller handlers.
It was previously only supporting the `AntPathMatcher` strategy, but it now also offers `PathPatternParser`. It was previously only supporting the `AntPathMatcher` strategy, but it now also offers `PathPatternParser`.
Spring Boot now provides a configuration property to choose and opt in the new strategy: Spring Boot now provides a configuration property to choose and opt in the new strategy:
@ -271,11 +246,8 @@ Spring Boot now provides a configuration property to choose and opt in the new s
For more details on why you should consider this new implementation, see the For more details on why you should consider this new implementation, see the
https://spring.io/blog/2020/06/30/url-matching-with-pathpattern-in-spring-mvc[dedicated blog post]. https://spring.io/blog/2020/06/30/url-matching-with-pathpattern-in-spring-mvc[dedicated blog post].
NOTE: `PathPatternParser` is an optimized implementation but restricts usage of NOTE: `PathPatternParser` is an optimized implementation but restricts usage of {spring-framework-docs}/web.html#mvc-ann-requestmapping-uri-templates[some path patterns variants].
{spring-framework-docs}/web.html#mvc-ann-requestmapping-uri-templates[some path patterns variants] It is incompatible with suffix pattern matching or mapping the `DispatcherServlet` with a servlet prefix (configprop:spring.mvc.servlet.path[]).
and is incompatible with suffix pattern matching (configprop:spring.mvc.pathmatch.use-suffix-pattern[deprecated],
configprop:spring.mvc.pathmatch.use-registered-suffix-pattern[deprecated]) or mapping the `DispatcherServlet`
with a servlet prefix (configprop:spring.mvc.servlet.path[]).

@ -38,7 +38,7 @@ import org.springframework.boot.test.autoconfigure.actuate.observability.AutoCon
@Retention(RetentionPolicy.RUNTIME) @Retention(RetentionPolicy.RUNTIME)
@Documented @Documented
@Inherited @Inherited
@Deprecated @Deprecated(since = "3.0.0", forRemoval = true)
@AutoConfigureObservability(tracing = false) @AutoConfigureObservability(tracing = false)
public @interface AutoConfigureMetrics { public @interface AutoConfigureMetrics {

@ -32,9 +32,10 @@ import static org.assertj.core.api.Assertions.assertThat;
* *
* @author Chris Bono * @author Chris Bono
*/ */
@SuppressWarnings("deprecation") @SuppressWarnings("removal")
@SpringBootTest @SpringBootTest
@AutoConfigureMetrics @AutoConfigureMetrics
@Deprecated(since = "3.0.0", forRemoval = true)
class AutoConfigureMetricsPresentIntegrationTests { class AutoConfigureMetricsPresentIntegrationTests {
@Test @Test

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2019 the original author or authors. * Copyright 2012-2022 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -58,7 +58,7 @@ public interface ApplicationContextAssertProvider<C extends ApplicationContext>
* @deprecated to prevent accidental use. Prefer standard AssertJ * @deprecated to prevent accidental use. Prefer standard AssertJ
* {@code assertThat(context)...} calls instead. * {@code assertThat(context)...} calls instead.
*/ */
@Deprecated @Deprecated(since = "2.0.0", forRemoval = false)
@Override @Override
ApplicationContextAssert<C> assertThat(); ApplicationContextAssert<C> assertThat();

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2021 the original author or authors. * Copyright 2012-2022 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -76,7 +76,7 @@ public final class JsonContent<T> implements AssertProvider<JsonContentAssert> {
* {@code assertThat(context)...} calls instead. * {@code assertThat(context)...} calls instead.
*/ */
@Override @Override
@Deprecated @Deprecated(since = "1.5.7", forRemoval = false)
public JsonContentAssert assertThat() { public JsonContentAssert assertThat() {
return new JsonContentAssert(this.resourceLoadClass, null, this.json, this.configuration); return new JsonContentAssert(this.resourceLoadClass, null, this.json, this.configuration);
} }

@ -103,7 +103,7 @@ public class ExplodedArchive implements Archive {
} }
@Override @Override
@Deprecated @Deprecated(since = "2.3.10", forRemoval = false)
public Iterator<Entry> iterator() { public Iterator<Entry> iterator() {
return new EntryIterator(this.root, this.recursive, null, null); return new EntryIterator(this.root, this.recursive, null, null);
} }
@ -322,7 +322,7 @@ public class ExplodedArchive implements Archive {
} }
@Override @Override
@Deprecated @Deprecated(since = "2.3.10", forRemoval = false)
public Iterator<Entry> iterator() { public Iterator<Entry> iterator() {
return Collections.emptyIterator(); return Collections.emptyIterator();
} }

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2021 the original author or authors. * Copyright 2012-2022 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -97,7 +97,7 @@ public class JarFileArchive implements Archive {
} }
@Override @Override
@Deprecated @Deprecated(since = "2.3.10", forRemoval = false)
public Iterator<Entry> iterator() { public Iterator<Entry> iterator() {
return new EntryIterator(this.jarFile.iterator(), null, null); return new EntryIterator(this.jarFile.iterator(), null, null);
} }

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2021 the original author or authors. * Copyright 2012-2022 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -59,10 +59,10 @@ abstract class AbstractArchiveIntegrationTests {
} }
protected AssertProvider<JarAssert> jar(File file) { protected AssertProvider<JarAssert> jar(File file) {
return new AssertProvider<JarAssert>() { return new AssertProvider<>() {
@Override @Override
@Deprecated @Deprecated(since = "2.3.0", forRemoval = false)
public JarAssert assertThat() { public JarAssert assertThat() {
return new JarAssert(file); return new JarAssert(file);
} }

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2021 the original author or authors. * Copyright 2012-2022 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -114,10 +114,10 @@ class BuildInfoIntegrationTests {
} }
private AssertProvider<BuildInfoAssert> buildInfo(File project, String buildInfo) { private AssertProvider<BuildInfoAssert> buildInfo(File project, String buildInfo) {
return new AssertProvider<BuildInfoAssert>() { return new AssertProvider<>() {
@Override @Override
@Deprecated @Deprecated(since = "2.3.0", forRemoval = false)
public BuildInfoAssert assertThat() { public BuildInfoAssert assertThat() {
return new BuildInfoAssert(new File(project, buildInfo)); return new BuildInfoAssert(new File(project, buildInfo));
} }

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2020 the original author or authors. * Copyright 2012-2022 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -58,7 +58,7 @@ public class PropertiesMergingResourceTransformer implements ReproducibleResourc
} }
@Override @Override
@Deprecated @Deprecated(since = "2.4.0", forRemoval = false)
public void processResource(String resource, InputStream inputStream, List<Relocator> relocators) public void processResource(String resource, InputStream inputStream, List<Relocator> relocators)
throws IOException { throws IOException {
processResource(resource, inputStream, relocators, 0); processResource(resource, inputStream, relocators, 0);

@ -60,7 +60,7 @@ import org.springframework.util.ResourceUtils;
* @since 2.0.0 * @since 2.0.0
* @deprecated this class is meant for Spring Boot internal use only. * @deprecated this class is meant for Spring Boot internal use only.
*/ */
@Deprecated @Deprecated(since = "2.0.0", forRemoval = false)
public class SslServerCustomizer implements NettyServerCustomizer { public class SslServerCustomizer implements NettyServerCustomizer {
private final Ssl ssl; private final Ssl ssl;

Loading…
Cancel
Save