Deprecate setObservationRegistry
This commit deprecates setObservationRegistry on DefaultJmsListenerContainerFactoryConfigurer as it should not have been made public in the first place. We want to make sure users don't accidentally use it, and move it back to a package private method once the deprecation period has run its course. Closes gh-44466
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2024 the original author or authors.
|
||||
* Copyright 2012-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.
|
||||
@@ -101,7 +101,10 @@ public final class DefaultJmsListenerContainerFactoryConfigurer {
|
||||
* Set the {@link ObservationRegistry} to use.
|
||||
* @param observationRegistry the {@link ObservationRegistry}
|
||||
* @since 3.2.1
|
||||
* @deprecated since 3.3.10 for removal in 3.6.0 as this should have been package
|
||||
* private
|
||||
*/
|
||||
@Deprecated(since = "3.3.10", forRemoval = true)
|
||||
public void setObservationRegistry(ObservationRegistry observationRegistry) {
|
||||
this.observationRegistry = observationRegistry;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2021 the original author or authors.
|
||||
* Copyright 2012-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.
|
||||
@@ -72,6 +72,7 @@ class JmsAnnotationDrivenConfiguration {
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean
|
||||
@SuppressWarnings("removal")
|
||||
DefaultJmsListenerContainerFactoryConfigurer jmsListenerContainerFactoryConfigurer() {
|
||||
DefaultJmsListenerContainerFactoryConfigurer configurer = new DefaultJmsListenerContainerFactoryConfigurer();
|
||||
configurer.setDestinationResolver(this.destinationResolver.getIfUnique());
|
||||
|
||||
Reference in New Issue
Block a user