Switch away from using @ConditionalOnProperty prefix
Merge `prefix` into `name` attribute and simplify annotations where possible. Closes gh-43703
This commit is contained in:
@@ -46,7 +46,7 @@ final class OtlpLoggingConfigurations {
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean
|
||||
@ConditionalOnProperty(prefix = "management.otlp.logging", name = "endpoint")
|
||||
@ConditionalOnProperty("management.otlp.logging.endpoint")
|
||||
OtlpLoggingConnectionDetails otlpLoggingConnectionDetails(OtlpLoggingProperties properties) {
|
||||
return new PropertiesOtlpLoggingConnectionDetails(properties);
|
||||
}
|
||||
@@ -81,8 +81,7 @@ final class OtlpLoggingConfigurations {
|
||||
static class Exporters {
|
||||
|
||||
@Bean
|
||||
@ConditionalOnProperty(prefix = "management.otlp.logging", name = "transport", havingValue = "http",
|
||||
matchIfMissing = true)
|
||||
@ConditionalOnProperty(name = "management.otlp.logging.transport", havingValue = "http", matchIfMissing = true)
|
||||
OtlpHttpLogRecordExporter otlpHttpLogRecordExporter(OtlpLoggingProperties properties,
|
||||
OtlpLoggingConnectionDetails connectionDetails) {
|
||||
OtlpHttpLogRecordExporterBuilder builder = OtlpHttpLogRecordExporter.builder()
|
||||
@@ -95,7 +94,7 @@ final class OtlpLoggingConfigurations {
|
||||
}
|
||||
|
||||
@Bean
|
||||
@ConditionalOnProperty(prefix = "management.otlp.logging", name = "transport", havingValue = "grpc")
|
||||
@ConditionalOnProperty(name = "management.otlp.logging.transport", havingValue = "grpc")
|
||||
OtlpGrpcLogRecordExporter otlpGrpcLogRecordExporter(OtlpLoggingProperties properties,
|
||||
OtlpLoggingConnectionDetails connectionDetails) {
|
||||
OtlpGrpcLogRecordExporterBuilder builder = OtlpGrpcLogRecordExporter.builder()
|
||||
|
||||
@@ -44,7 +44,7 @@ class OtlpTracingConfigurations {
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean
|
||||
@ConditionalOnProperty(prefix = "management.otlp.tracing", name = "endpoint")
|
||||
@ConditionalOnProperty("management.otlp.tracing.endpoint")
|
||||
OtlpTracingConnectionDetails otlpTracingConnectionDetails(OtlpTracingProperties properties) {
|
||||
return new PropertiesOtlpTracingConnectionDetails(properties);
|
||||
}
|
||||
@@ -79,8 +79,7 @@ class OtlpTracingConfigurations {
|
||||
static class Exporters {
|
||||
|
||||
@Bean
|
||||
@ConditionalOnProperty(prefix = "management.otlp.tracing", name = "transport", havingValue = "http",
|
||||
matchIfMissing = true)
|
||||
@ConditionalOnProperty(name = "management.otlp.tracing.transport", havingValue = "http", matchIfMissing = true)
|
||||
OtlpHttpSpanExporter otlpHttpSpanExporter(OtlpTracingProperties properties,
|
||||
OtlpTracingConnectionDetails connectionDetails) {
|
||||
OtlpHttpSpanExporterBuilder builder = OtlpHttpSpanExporter.builder()
|
||||
@@ -93,7 +92,7 @@ class OtlpTracingConfigurations {
|
||||
}
|
||||
|
||||
@Bean
|
||||
@ConditionalOnProperty(prefix = "management.otlp.tracing", name = "transport", havingValue = "grpc")
|
||||
@ConditionalOnProperty(name = "management.otlp.tracing.transport", havingValue = "grpc")
|
||||
OtlpGrpcSpanExporter otlpGrpcSpanExporter(OtlpTracingProperties properties,
|
||||
OtlpTracingConnectionDetails connectionDetails) {
|
||||
OtlpGrpcSpanExporterBuilder builder = OtlpGrpcSpanExporter.builder()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2022 the original author or authors.
|
||||
* Copyright 2012-2024 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.
|
||||
@@ -60,7 +60,7 @@ public class ServletManagementContextAutoConfiguration {
|
||||
// Put Servlets and Filters in their own nested class so they don't force early
|
||||
// instantiation of ManagementServerProperties.
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnProperty(prefix = "management.server", name = "add-application-context-header", havingValue = "true")
|
||||
@ConditionalOnProperty(name = "management.server.add-application-context-header", havingValue = "true")
|
||||
protected static class ApplicationContextFilterConfiguration {
|
||||
|
||||
@Bean
|
||||
|
||||
@@ -82,8 +82,7 @@ class RabbitAnnotationDrivenConfiguration {
|
||||
|
||||
@Bean(name = "rabbitListenerContainerFactory")
|
||||
@ConditionalOnMissingBean(name = "rabbitListenerContainerFactory")
|
||||
@ConditionalOnProperty(prefix = "spring.rabbitmq.listener", name = "type", havingValue = "simple",
|
||||
matchIfMissing = true)
|
||||
@ConditionalOnProperty(name = "spring.rabbitmq.listener.type", havingValue = "simple", matchIfMissing = true)
|
||||
SimpleRabbitListenerContainerFactory simpleRabbitListenerContainerFactory(
|
||||
SimpleRabbitListenerContainerFactoryConfigurer configurer, ConnectionFactory connectionFactory,
|
||||
ObjectProvider<ContainerCustomizer<SimpleMessageListenerContainer>> simpleContainerCustomizer) {
|
||||
@@ -111,7 +110,7 @@ class RabbitAnnotationDrivenConfiguration {
|
||||
|
||||
@Bean(name = "rabbitListenerContainerFactory")
|
||||
@ConditionalOnMissingBean(name = "rabbitListenerContainerFactory")
|
||||
@ConditionalOnProperty(prefix = "spring.rabbitmq.listener", name = "type", havingValue = "direct")
|
||||
@ConditionalOnProperty(name = "spring.rabbitmq.listener.type", havingValue = "direct")
|
||||
DirectRabbitListenerContainerFactory directRabbitListenerContainerFactory(
|
||||
DirectRabbitListenerContainerFactoryConfigurer configurer, ConnectionFactory connectionFactory,
|
||||
ObjectProvider<ContainerCustomizer<DirectMessageListenerContainer>> directContainerCustomizer) {
|
||||
|
||||
@@ -164,7 +164,7 @@ public class RabbitAutoConfiguration {
|
||||
|
||||
@Bean
|
||||
@ConditionalOnSingleCandidate(ConnectionFactory.class)
|
||||
@ConditionalOnProperty(prefix = "spring.rabbitmq", name = "dynamic", matchIfMissing = true)
|
||||
@ConditionalOnProperty(name = "spring.rabbitmq.dynamic", matchIfMissing = true)
|
||||
@ConditionalOnMissingBean
|
||||
public AmqpAdmin amqpAdmin(ConnectionFactory connectionFactory) {
|
||||
return new RabbitAdmin(connectionFactory);
|
||||
|
||||
@@ -52,7 +52,7 @@ class RabbitStreamConfiguration {
|
||||
|
||||
@Bean(name = "rabbitListenerContainerFactory")
|
||||
@ConditionalOnMissingBean(name = "rabbitListenerContainerFactory")
|
||||
@ConditionalOnProperty(prefix = "spring.rabbitmq.listener", name = "type", havingValue = "stream")
|
||||
@ConditionalOnProperty(name = "spring.rabbitmq.listener.type", havingValue = "stream")
|
||||
StreamRabbitListenerContainerFactory streamRabbitListenerContainerFactory(Environment rabbitStreamEnvironment,
|
||||
RabbitProperties properties, ObjectProvider<ConsumerCustomizer> consumerCustomizer,
|
||||
ObjectProvider<ContainerCustomizer<StreamListenerContainer>> containerCustomizer) {
|
||||
@@ -90,7 +90,7 @@ class RabbitStreamConfiguration {
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean(RabbitStreamOperations.class)
|
||||
@ConditionalOnProperty(prefix = "spring.rabbitmq.stream", name = "name")
|
||||
@ConditionalOnProperty(name = "spring.rabbitmq.stream.name")
|
||||
RabbitStreamTemplate rabbitStreamTemplate(Environment rabbitStreamEnvironment, RabbitProperties properties,
|
||||
RabbitStreamTemplateConfigurer configurer) {
|
||||
RabbitStreamTemplate template = new RabbitStreamTemplate(rabbitStreamEnvironment,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2022 the original author or authors.
|
||||
* Copyright 2012-2024 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.
|
||||
@@ -44,7 +44,7 @@ import org.springframework.context.annotation.EnableAspectJAutoProxy;
|
||||
* @see EnableAspectJAutoProxy
|
||||
*/
|
||||
@AutoConfiguration
|
||||
@ConditionalOnProperty(prefix = "spring.aop", name = "auto", havingValue = "true", matchIfMissing = true)
|
||||
@ConditionalOnProperty(name = "spring.aop.auto", havingValue = "true", matchIfMissing = true)
|
||||
public class AopAutoConfiguration {
|
||||
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@@ -53,15 +53,14 @@ public class AopAutoConfiguration {
|
||||
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@EnableAspectJAutoProxy(proxyTargetClass = false)
|
||||
@ConditionalOnProperty(prefix = "spring.aop", name = "proxy-target-class", havingValue = "false")
|
||||
@ConditionalOnProperty(name = "spring.aop.proxy-target-class", havingValue = "false")
|
||||
static class JdkDynamicAutoProxyConfiguration {
|
||||
|
||||
}
|
||||
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@EnableAspectJAutoProxy(proxyTargetClass = true)
|
||||
@ConditionalOnProperty(prefix = "spring.aop", name = "proxy-target-class", havingValue = "true",
|
||||
matchIfMissing = true)
|
||||
@ConditionalOnProperty(name = "spring.aop.proxy-target-class", havingValue = "true", matchIfMissing = true)
|
||||
static class CglibAutoProxyConfiguration {
|
||||
|
||||
}
|
||||
@@ -70,8 +69,7 @@ public class AopAutoConfiguration {
|
||||
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnMissingClass("org.aspectj.weaver.Advice")
|
||||
@ConditionalOnProperty(prefix = "spring.aop", name = "proxy-target-class", havingValue = "true",
|
||||
matchIfMissing = true)
|
||||
@ConditionalOnProperty(name = "spring.aop.proxy-target-class", havingValue = "true", matchIfMissing = true)
|
||||
static class ClassProxyingConfiguration {
|
||||
|
||||
@Bean
|
||||
|
||||
@@ -228,7 +228,7 @@ public class CouchbaseAutoConfiguration {
|
||||
super(ConfigurationPhase.REGISTER_BEAN);
|
||||
}
|
||||
|
||||
@ConditionalOnProperty(prefix = "spring.couchbase", name = "connection-string")
|
||||
@ConditionalOnProperty("spring.couchbase.connection-string")
|
||||
private static final class CouchbaseUrlCondition {
|
||||
|
||||
}
|
||||
|
||||
@@ -104,13 +104,12 @@ public class JpaRepositoriesAutoConfiguration {
|
||||
super(ConfigurationPhase.REGISTER_BEAN);
|
||||
}
|
||||
|
||||
@ConditionalOnProperty(prefix = "spring.data.jpa.repositories", name = "bootstrap-mode",
|
||||
havingValue = "deferred")
|
||||
@ConditionalOnProperty(name = "spring.data.jpa.repositories.bootstrap-mode", havingValue = "deferred")
|
||||
static class DeferredBootstrapMode {
|
||||
|
||||
}
|
||||
|
||||
@ConditionalOnProperty(prefix = "spring.data.jpa.repositories", name = "bootstrap-mode", havingValue = "lazy")
|
||||
@ConditionalOnProperty(name = "spring.data.jpa.repositories.bootstrap-mode", havingValue = "lazy")
|
||||
static class LazyBootstrapMode {
|
||||
|
||||
}
|
||||
|
||||
@@ -450,7 +450,7 @@ public class FlywayAutoConfiguration {
|
||||
|
||||
}
|
||||
|
||||
@ConditionalOnProperty(prefix = "spring.flyway", name = "url")
|
||||
@ConditionalOnProperty("spring.flyway.url")
|
||||
private static final class FlywayUrlCondition {
|
||||
|
||||
}
|
||||
|
||||
@@ -165,7 +165,7 @@ public class GraphQlWebFluxAutoConfiguration {
|
||||
}
|
||||
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnProperty(prefix = "spring.graphql.websocket", name = "path")
|
||||
@ConditionalOnProperty("spring.graphql.websocket.path")
|
||||
public static class WebSocketConfiguration {
|
||||
|
||||
@Bean
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2023 the original author or authors.
|
||||
* Copyright 2012-2024 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.
|
||||
@@ -49,7 +49,7 @@ import org.springframework.messaging.rsocket.annotation.support.RSocketMessageHa
|
||||
@AutoConfiguration(after = { GraphQlAutoConfiguration.class, RSocketMessagingAutoConfiguration.class })
|
||||
@ConditionalOnClass({ GraphQL.class, GraphQlSource.class, RSocketServer.class, HttpServer.class })
|
||||
@ConditionalOnBean({ RSocketMessageHandler.class, AnnotatedControllerConfigurer.class })
|
||||
@ConditionalOnProperty(prefix = "spring.graphql.rsocket", name = "mapping")
|
||||
@ConditionalOnProperty("spring.graphql.rsocket.mapping")
|
||||
public class GraphQlRSocketAutoConfiguration {
|
||||
|
||||
@Bean
|
||||
|
||||
@@ -172,7 +172,7 @@ public class GraphQlWebMvcAutoConfiguration {
|
||||
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnClass({ ServerContainer.class, WebSocketHandler.class })
|
||||
@ConditionalOnProperty(prefix = "spring.graphql.websocket", name = "path")
|
||||
@ConditionalOnProperty("spring.graphql.websocket.path")
|
||||
public static class WebSocketConfiguration {
|
||||
|
||||
@Bean
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2022 the original author or authors.
|
||||
* Copyright 2012-2024 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.
|
||||
@@ -60,8 +60,7 @@ public class HypermediaAutoConfiguration {
|
||||
@Bean
|
||||
@ConditionalOnMissingBean
|
||||
@ConditionalOnClass(name = "com.fasterxml.jackson.databind.ObjectMapper")
|
||||
@ConditionalOnProperty(prefix = "spring.hateoas", name = "use-hal-as-default-json-media-type",
|
||||
matchIfMissing = true)
|
||||
@ConditionalOnProperty(name = "spring.hateoas.use-hal-as-default-json-media-type", matchIfMissing = true)
|
||||
HalConfiguration applicationJsonHalConfiguration() {
|
||||
return new HalConfiguration().withMediaType(MediaType.APPLICATION_JSON);
|
||||
}
|
||||
|
||||
@@ -347,12 +347,13 @@ public class IntegrationAutoConfiguration {
|
||||
super(ConfigurationPhase.REGISTER_BEAN);
|
||||
}
|
||||
|
||||
@ConditionalOnProperty(prefix = "spring.integration.rsocket.client", name = "uri")
|
||||
@ConditionalOnProperty("spring.integration.rsocket.client.uri")
|
||||
static class WebSocketAddressConfigured {
|
||||
|
||||
}
|
||||
|
||||
@ConditionalOnProperty(prefix = "spring.integration.rsocket.client", name = { "host", "port" })
|
||||
@ConditionalOnProperty({ "spring.integration.rsocket.client.host",
|
||||
"spring.integration.rsocket.client.port" })
|
||||
static class TcpAddressConfigured {
|
||||
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ public class DataSourceAutoConfiguration {
|
||||
super(ConfigurationPhase.PARSE_CONFIGURATION);
|
||||
}
|
||||
|
||||
@ConditionalOnProperty(prefix = "spring.datasource", name = "type")
|
||||
@ConditionalOnProperty("spring.datasource.type")
|
||||
static class ExplicitType {
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2021 the original author or authors.
|
||||
* Copyright 2012-2024 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.
|
||||
@@ -74,7 +74,7 @@ class DataSourceJmxConfiguration {
|
||||
}
|
||||
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnProperty(prefix = "spring.datasource.tomcat", name = "jmx-enabled")
|
||||
@ConditionalOnProperty("spring.datasource.tomcat.jmx-enabled")
|
||||
@ConditionalOnClass(DataSourceProxy.class)
|
||||
@ConditionalOnSingleCandidate(DataSource.class)
|
||||
static class TomcatDataSourceJmxConfiguration {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2022 the original author or authors.
|
||||
* Copyright 2012-2024 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.
|
||||
@@ -41,7 +41,7 @@ import org.springframework.jmx.support.JmxUtils;
|
||||
*/
|
||||
@AutoConfiguration(before = { XADataSourceAutoConfiguration.class, DataSourceAutoConfiguration.class })
|
||||
@ConditionalOnClass({ DataSource.class, EmbeddedDatabaseType.class })
|
||||
@ConditionalOnProperty(prefix = "spring.datasource", name = "jndi-name")
|
||||
@ConditionalOnProperty("spring.datasource.jndi-name")
|
||||
@EnableConfigurationProperties(DataSourceProperties.class)
|
||||
public class JndiDataSourceAutoConfiguration {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2023 the original author or authors.
|
||||
* Copyright 2012-2024 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.
|
||||
@@ -115,7 +115,7 @@ public class JerseyAutoConfiguration implements ServletContextAware {
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean(name = "jerseyFilterRegistration")
|
||||
@ConditionalOnProperty(prefix = "spring.jersey", name = "type", havingValue = "filter")
|
||||
@ConditionalOnProperty(name = "spring.jersey.type", havingValue = "filter")
|
||||
public FilterRegistrationBean<ServletContainer> jerseyFilterRegistration(JerseyApplicationPath applicationPath) {
|
||||
FilterRegistrationBean<ServletContainer> registration = new FilterRegistrationBean<>();
|
||||
registration.setFilter(new ServletContainer(this.config));
|
||||
@@ -137,7 +137,7 @@ public class JerseyAutoConfiguration implements ServletContextAware {
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean(name = "jerseyServletRegistration")
|
||||
@ConditionalOnProperty(prefix = "spring.jersey", name = "type", havingValue = "servlet", matchIfMissing = true)
|
||||
@ConditionalOnProperty(name = "spring.jersey.type", havingValue = "servlet", matchIfMissing = true)
|
||||
public ServletRegistrationBean<ServletContainer> jerseyServletRegistration(JerseyApplicationPath applicationPath) {
|
||||
ServletRegistrationBean<ServletContainer> registration = new ServletRegistrationBean<>(
|
||||
new ServletContainer(this.config), applicationPath.getUrlMapping());
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2022 the original author or authors.
|
||||
* Copyright 2012-2024 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.
|
||||
@@ -89,7 +89,7 @@ public class JndiConnectionFactoryAutoConfiguration {
|
||||
|
||||
}
|
||||
|
||||
@ConditionalOnProperty(prefix = "spring.jms", name = "jndi-name")
|
||||
@ConditionalOnProperty("spring.jms.jndi-name")
|
||||
static class Property {
|
||||
|
||||
}
|
||||
|
||||
@@ -46,8 +46,7 @@ import org.springframework.jms.connection.CachingConnectionFactory;
|
||||
class ActiveMQConnectionFactoryConfiguration {
|
||||
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnProperty(prefix = "spring.activemq.pool", name = "enabled", havingValue = "false",
|
||||
matchIfMissing = true)
|
||||
@ConditionalOnProperty(name = "spring.activemq.pool.enabled", havingValue = "false", matchIfMissing = true)
|
||||
static class SimpleConnectionFactoryConfiguration {
|
||||
|
||||
@Bean
|
||||
|
||||
@@ -57,8 +57,7 @@ class ActiveMQXAConnectionFactoryConfiguration {
|
||||
}
|
||||
|
||||
@Bean
|
||||
@ConditionalOnProperty(prefix = "spring.activemq.pool", name = "enabled", havingValue = "false",
|
||||
matchIfMissing = true)
|
||||
@ConditionalOnProperty(name = "spring.activemq.pool.enabled", havingValue = "false", matchIfMissing = true)
|
||||
ActiveMQConnectionFactory nonXaJmsConnectionFactory(ActiveMQProperties properties,
|
||||
ObjectProvider<ActiveMQConnectionFactoryCustomizer> factoryCustomizers,
|
||||
ActiveMQConnectionDetails connectionDetails) {
|
||||
|
||||
@@ -43,8 +43,7 @@ import org.springframework.jms.connection.CachingConnectionFactory;
|
||||
class ArtemisConnectionFactoryConfiguration {
|
||||
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnProperty(prefix = "spring.artemis.pool", name = "enabled", havingValue = "false",
|
||||
matchIfMissing = true)
|
||||
@ConditionalOnProperty(name = "spring.artemis.pool.enabled", havingValue = "false", matchIfMissing = true)
|
||||
static class SimpleConnectionFactoryConfiguration {
|
||||
|
||||
@Bean(name = "jmsConnectionFactory")
|
||||
|
||||
@@ -209,7 +209,7 @@ public class LiquibaseAutoConfiguration {
|
||||
|
||||
}
|
||||
|
||||
@ConditionalOnProperty(prefix = "spring.liquibase", name = "url")
|
||||
@ConditionalOnProperty("spring.liquibase.url")
|
||||
private static final class LiquibaseUrlCondition {
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2022 the original author or authors.
|
||||
* Copyright 2012-2024 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.
|
||||
@@ -57,12 +57,12 @@ public class MailSenderAutoConfiguration {
|
||||
super(ConfigurationPhase.PARSE_CONFIGURATION);
|
||||
}
|
||||
|
||||
@ConditionalOnProperty(prefix = "spring.mail", name = "host")
|
||||
@ConditionalOnProperty("spring.mail.host")
|
||||
static class HostProperty {
|
||||
|
||||
}
|
||||
|
||||
@ConditionalOnProperty(prefix = "spring.mail", name = "jndi-name")
|
||||
@ConditionalOnProperty("spring.mail.jndi-name")
|
||||
static class JndiNameProperty {
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2021 the original author or authors.
|
||||
* Copyright 2012-2024 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.
|
||||
@@ -38,7 +38,7 @@ import org.springframework.mail.javamail.JavaMailSenderImpl;
|
||||
*/
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnClass(Session.class)
|
||||
@ConditionalOnProperty(prefix = "spring.mail", name = "jndi-name")
|
||||
@ConditionalOnProperty("spring.mail.jndi-name")
|
||||
@ConditionalOnJndi
|
||||
class MailSenderJndiConfiguration {
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ import org.springframework.util.StringUtils;
|
||||
* @author Stephane Nicoll
|
||||
*/
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnProperty(prefix = "spring.mail", name = "host")
|
||||
@ConditionalOnProperty("spring.mail.host")
|
||||
class MailSenderPropertiesConfiguration {
|
||||
|
||||
@Bean
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2022 the original author or authors.
|
||||
* Copyright 2012-2024 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.
|
||||
@@ -33,7 +33,7 @@ import org.springframework.mail.javamail.JavaMailSenderImpl;
|
||||
* @since 1.3.0
|
||||
*/
|
||||
@AutoConfiguration(after = MailSenderAutoConfiguration.class)
|
||||
@ConditionalOnProperty(prefix = "spring.mail", value = "test-connection")
|
||||
@ConditionalOnProperty("spring.mail.test-connection")
|
||||
@ConditionalOnSingleCandidate(JavaMailSenderImpl.class)
|
||||
public class MailSenderValidatorAutoConfiguration {
|
||||
|
||||
|
||||
@@ -224,7 +224,7 @@ public abstract class JpaBaseConfiguration {
|
||||
@ConditionalOnClass(WebMvcConfigurer.class)
|
||||
@ConditionalOnMissingBean({ OpenEntityManagerInViewInterceptor.class, OpenEntityManagerInViewFilter.class })
|
||||
@ConditionalOnMissingFilterBean(OpenEntityManagerInViewFilter.class)
|
||||
@ConditionalOnProperty(prefix = "spring.jpa", name = "open-in-view", havingValue = "true", matchIfMissing = true)
|
||||
@ConditionalOnProperty(name = "spring.jpa.open-in-view", havingValue = "true", matchIfMissing = true)
|
||||
protected static class JpaWebConfiguration {
|
||||
|
||||
private static final Log logger = LogFactory.getLog(JpaWebConfiguration.class);
|
||||
|
||||
@@ -97,7 +97,7 @@ public class QuartzAutoConfiguration {
|
||||
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnSingleCandidate(DataSource.class)
|
||||
@ConditionalOnProperty(prefix = "spring.quartz", name = "job-store-type", havingValue = "jdbc")
|
||||
@ConditionalOnProperty(name = "spring.quartz.job-store-type", havingValue = "jdbc")
|
||||
@Import(DatabaseInitializationDependencyConfigurer.class)
|
||||
protected static class JdbcStoreTypeConfiguration {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2023 the original author or authors.
|
||||
* Copyright 2012-2024 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.
|
||||
@@ -123,8 +123,7 @@ abstract class ConnectionFactoryConfigurations {
|
||||
}
|
||||
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnProperty(prefix = "spring.r2dbc.pool", value = "enabled", havingValue = "false",
|
||||
matchIfMissing = true)
|
||||
@ConditionalOnProperty(name = "spring.r2dbc.pool.enabled", havingValue = "false", matchIfMissing = true)
|
||||
@ConditionalOnMissingBean(ConnectionFactory.class)
|
||||
static class GenericConfiguration {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2023 the original author or authors.
|
||||
* Copyright 2012-2024 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.
|
||||
@@ -94,7 +94,7 @@ public class RSocketServerAutoConfiguration {
|
||||
|
||||
}
|
||||
|
||||
@ConditionalOnProperty(prefix = "spring.rsocket.server", name = "port")
|
||||
@ConditionalOnProperty("spring.rsocket.server.port")
|
||||
@ConditionalOnClass(ReactorResourceFactory.class)
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@Import(ReactorNettyConfigurations.ReactorResourceFactoryConfiguration.class)
|
||||
@@ -147,17 +147,17 @@ public class RSocketServerAutoConfiguration {
|
||||
|
||||
}
|
||||
|
||||
@ConditionalOnProperty(prefix = "spring.rsocket.server", name = "port", matchIfMissing = true)
|
||||
@ConditionalOnProperty(name = "spring.rsocket.server.port", matchIfMissing = true)
|
||||
static class HasNoPortConfigured {
|
||||
|
||||
}
|
||||
|
||||
@ConditionalOnProperty(prefix = "spring.rsocket.server", name = "mapping-path")
|
||||
@ConditionalOnProperty("spring.rsocket.server.mapping-path")
|
||||
static class HasMappingPathConfigured {
|
||||
|
||||
}
|
||||
|
||||
@ConditionalOnProperty(prefix = "spring.rsocket.server", name = "transport", havingValue = "websocket")
|
||||
@ConditionalOnProperty(name = "spring.rsocket.server.transport", havingValue = "websocket")
|
||||
static class HasWebsocketTransportConfigured {
|
||||
|
||||
}
|
||||
|
||||
@@ -227,17 +227,17 @@ class ReactiveOAuth2ResourceServerJwkConfiguration {
|
||||
super(ConfigurationPhase.REGISTER_BEAN);
|
||||
}
|
||||
|
||||
@ConditionalOnProperty(prefix = "spring.security.oauth2.resourceserver.jwt", name = "authority-prefix")
|
||||
@ConditionalOnProperty("spring.security.oauth2.resourceserver.jwt.authority-prefix")
|
||||
static class OnAuthorityPrefix {
|
||||
|
||||
}
|
||||
|
||||
@ConditionalOnProperty(prefix = "spring.security.oauth2.resourceserver.jwt", name = "principal-claim-name")
|
||||
@ConditionalOnProperty("spring.security.oauth2.resourceserver.jwt.principal-claim-name")
|
||||
static class OnPrincipalClaimName {
|
||||
|
||||
}
|
||||
|
||||
@ConditionalOnProperty(prefix = "spring.security.oauth2.resourceserver.jwt", name = "authorities-claim-name")
|
||||
@ConditionalOnProperty("spring.security.oauth2.resourceserver.jwt.authorities-claim-name")
|
||||
static class OnAuthoritiesClaimName {
|
||||
|
||||
}
|
||||
|
||||
@@ -219,17 +219,17 @@ class OAuth2ResourceServerJwtConfiguration {
|
||||
super(ConfigurationPhase.REGISTER_BEAN);
|
||||
}
|
||||
|
||||
@ConditionalOnProperty(prefix = "spring.security.oauth2.resourceserver.jwt", name = "authority-prefix")
|
||||
@ConditionalOnProperty("spring.security.oauth2.resourceserver.jwt.authority-prefix")
|
||||
static class OnAuthorityPrefix {
|
||||
|
||||
}
|
||||
|
||||
@ConditionalOnProperty(prefix = "spring.security.oauth2.resourceserver.jwt", name = "principal-claim-name")
|
||||
@ConditionalOnProperty("spring.security.oauth2.resourceserver.jwt.principal-claim-name")
|
||||
static class OnPrincipalClaimName {
|
||||
|
||||
}
|
||||
|
||||
@ConditionalOnProperty(prefix = "spring.security.oauth2.resourceserver.jwt", name = "authorities-claim-name")
|
||||
@ConditionalOnProperty("spring.security.oauth2.resourceserver.jwt.authorities-claim-name")
|
||||
static class OnAuthoritiesClaimName {
|
||||
|
||||
}
|
||||
|
||||
@@ -129,12 +129,12 @@ public class ReactiveUserDetailsServiceAutoConfiguration {
|
||||
|
||||
}
|
||||
|
||||
@ConditionalOnProperty(prefix = "spring.security.user", name = "name")
|
||||
@ConditionalOnProperty("spring.security.user.name")
|
||||
static final class NameConfigured {
|
||||
|
||||
}
|
||||
|
||||
@ConditionalOnProperty(prefix = "spring.security.user", name = "password")
|
||||
@ConditionalOnProperty("spring.security.user.password")
|
||||
static final class PasswordConfigured {
|
||||
|
||||
}
|
||||
|
||||
@@ -113,12 +113,12 @@ public class UserDetailsServiceAutoConfiguration {
|
||||
|
||||
}
|
||||
|
||||
@ConditionalOnProperty(prefix = "spring.security.user", name = "name")
|
||||
@ConditionalOnProperty("spring.security.user.name")
|
||||
static final class NameConfigured {
|
||||
|
||||
}
|
||||
|
||||
@ConditionalOnProperty(prefix = "spring.security.user", name = "password")
|
||||
@ConditionalOnProperty("spring.security.user.password")
|
||||
static final class PasswordConfigured {
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2022 the original author or authors.
|
||||
* Copyright 2012-2024 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.
|
||||
@@ -40,7 +40,7 @@ import org.springframework.context.annotation.Bean;
|
||||
*/
|
||||
@AutoConfiguration
|
||||
@ConditionalOnClass(SendGrid.class)
|
||||
@ConditionalOnProperty(prefix = "spring.sendgrid", value = "api-key")
|
||||
@ConditionalOnProperty("spring.sendgrid.api-key")
|
||||
@EnableConfigurationProperties(SendGridProperties.class)
|
||||
public class SendGridAutoConfiguration {
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ import org.springframework.session.data.redis.config.annotation.web.server.Redis
|
||||
class RedisReactiveSessionConfiguration {
|
||||
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnProperty(prefix = "spring.session.redis", name = "repository-type", havingValue = "default",
|
||||
@ConditionalOnProperty(name = "spring.session.redis.repository-type", havingValue = "default",
|
||||
matchIfMissing = true)
|
||||
@Import(RedisWebSessionConfiguration.class)
|
||||
static class DefaultRedisSessionConfiguration {
|
||||
@@ -73,7 +73,7 @@ class RedisReactiveSessionConfiguration {
|
||||
}
|
||||
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnProperty(prefix = "spring.session.redis", name = "repository-type", havingValue = "indexed")
|
||||
@ConditionalOnProperty(name = "spring.session.redis.repository-type", havingValue = "indexed")
|
||||
@Import(RedisIndexedWebSessionConfiguration.class)
|
||||
static class IndexedRedisSessionConfiguration {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2023 the original author or authors.
|
||||
* Copyright 2012-2024 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.
|
||||
@@ -57,7 +57,7 @@ import org.springframework.session.data.redis.config.annotation.web.http.RedisIn
|
||||
class RedisSessionConfiguration {
|
||||
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnProperty(prefix = "spring.session.redis", name = "repository-type", havingValue = "default",
|
||||
@ConditionalOnProperty(name = "spring.session.redis.repository-type", havingValue = "default",
|
||||
matchIfMissing = true)
|
||||
@Import(RedisHttpSessionConfiguration.class)
|
||||
static class DefaultRedisSessionConfiguration {
|
||||
@@ -87,7 +87,7 @@ class RedisSessionConfiguration {
|
||||
}
|
||||
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnProperty(prefix = "spring.session.redis", name = "repository-type", havingValue = "indexed")
|
||||
@ConditionalOnProperty(name = "spring.session.redis.repository-type", havingValue = "indexed")
|
||||
@Import(RedisIndexedHttpSessionConfiguration.class)
|
||||
static class IndexedRedisSessionConfiguration {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2022 the original author or authors.
|
||||
* Copyright 2012-2024 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.
|
||||
@@ -46,7 +46,7 @@ public class SqlInitializationAutoConfiguration {
|
||||
super(ConfigurationPhase.PARSE_CONFIGURATION);
|
||||
}
|
||||
|
||||
@ConditionalOnProperty(prefix = "spring.sql.init", name = "mode", havingValue = "never")
|
||||
@ConditionalOnProperty(name = "spring.sql.init.mode", havingValue = "never")
|
||||
static class ModeIsNever {
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2023 the original author or authors.
|
||||
* Copyright 2012-2024 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,15 +72,14 @@ public class TransactionAutoConfiguration {
|
||||
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@EnableTransactionManagement(proxyTargetClass = false)
|
||||
@ConditionalOnProperty(prefix = "spring.aop", name = "proxy-target-class", havingValue = "false")
|
||||
@ConditionalOnProperty(name = "spring.aop.proxy-target-class", havingValue = "false")
|
||||
public static class JdkDynamicAutoProxyConfiguration {
|
||||
|
||||
}
|
||||
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@EnableTransactionManagement(proxyTargetClass = true)
|
||||
@ConditionalOnProperty(prefix = "spring.aop", name = "proxy-target-class", havingValue = "true",
|
||||
matchIfMissing = true)
|
||||
@ConditionalOnProperty(name = "spring.aop.proxy-target-class", havingValue = "true", matchIfMissing = true)
|
||||
public static class CglibAutoProxyConfiguration {
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2023 the original author or authors.
|
||||
* Copyright 2012-2024 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.
|
||||
@@ -77,7 +77,7 @@ public class ReactiveWebServerFactoryAutoConfiguration {
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean
|
||||
@ConditionalOnProperty(value = "server.forward-headers-strategy", havingValue = "framework")
|
||||
@ConditionalOnProperty(name = "server.forward-headers-strategy", havingValue = "framework")
|
||||
public ForwardedHeaderTransformer forwardedHeaderTransformer() {
|
||||
return new ForwardedHeaderTransformer();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2023 the original author or authors.
|
||||
* Copyright 2012-2024 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.
|
||||
@@ -89,7 +89,7 @@ public class ServletWebServerFactoryAutoConfiguration {
|
||||
}
|
||||
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnProperty(value = "server.forward-headers-strategy", havingValue = "framework")
|
||||
@ConditionalOnProperty(name = "server.forward-headers-strategy", havingValue = "framework")
|
||||
@ConditionalOnMissingFilterBean(ForwardedHeaderFilter.class)
|
||||
static class ForwardedHeaderFilterConfiguration {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2023 the original author or authors.
|
||||
* Copyright 2012-2024 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.
|
||||
@@ -26,6 +26,7 @@ import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnNoOptOut;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.boot.devtools.autoconfigure.DevToolsProperties.Restart;
|
||||
@@ -134,8 +135,7 @@ public class LocalDevToolsAutoConfiguration {
|
||||
}
|
||||
|
||||
@Bean
|
||||
@ConditionalOnProperty(prefix = "spring.devtools.restart", name = "log-condition-evaluation-delta",
|
||||
matchIfMissing = true)
|
||||
@ConditionalOnProperty(name = "spring.devtools.restart.log-condition-evaluation-delta", matchIfMissing = true)
|
||||
ConditionEvaluationDeltaLoggingListener conditionEvaluationDeltaLoggingListener() {
|
||||
return new ConditionEvaluationDeltaLoggingListener();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2022 the original author or authors.
|
||||
* Copyright 2012-2024 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.
|
||||
@@ -26,6 +26,7 @@ import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnNoOptOut;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.web.ServerProperties;
|
||||
@@ -61,7 +62,7 @@ import org.springframework.http.server.ServerHttpRequest;
|
||||
*/
|
||||
@AutoConfiguration(after = SecurityAutoConfiguration.class)
|
||||
@Conditional(OnEnabledDevToolsCondition.class)
|
||||
@ConditionalOnProperty(prefix = "spring.devtools.remote", name = "secret")
|
||||
@ConditionalOnProperty("spring.devtools.remote.secret")
|
||||
@ConditionalOnClass({ Filter.class, ServerHttpRequest.class })
|
||||
@Import(RemoteDevtoolsSecurityConfiguration.class)
|
||||
@EnableConfigurationProperties({ ServerProperties.class, DevToolsProperties.class })
|
||||
|
||||
@@ -79,8 +79,7 @@ public class TestDatabaseAutoConfiguration {
|
||||
|
||||
@Bean
|
||||
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
|
||||
@ConditionalOnProperty(prefix = "spring.test.database", name = "replace", havingValue = "NON_TEST",
|
||||
matchIfMissing = true)
|
||||
@ConditionalOnProperty(name = "spring.test.database.replace", havingValue = "NON_TEST", matchIfMissing = true)
|
||||
static EmbeddedDataSourceBeanFactoryPostProcessor nonTestEmbeddedDataSourceBeanFactoryPostProcessor(
|
||||
Environment environment) {
|
||||
return new EmbeddedDataSourceBeanFactoryPostProcessor(environment, Replace.NON_TEST);
|
||||
@@ -88,14 +87,14 @@ public class TestDatabaseAutoConfiguration {
|
||||
|
||||
@Bean
|
||||
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
|
||||
@ConditionalOnProperty(prefix = "spring.test.database", name = "replace", havingValue = "ANY")
|
||||
@ConditionalOnProperty(name = "spring.test.database.replace", havingValue = "ANY")
|
||||
static EmbeddedDataSourceBeanFactoryPostProcessor embeddedDataSourceBeanFactoryPostProcessor(
|
||||
Environment environment) {
|
||||
return new EmbeddedDataSourceBeanFactoryPostProcessor(environment, Replace.ANY);
|
||||
}
|
||||
|
||||
@Bean
|
||||
@ConditionalOnProperty(prefix = "spring.test.database", name = "replace", havingValue = "AUTO_CONFIGURED")
|
||||
@ConditionalOnProperty(name = "spring.test.database.replace", havingValue = "AUTO_CONFIGURED")
|
||||
@ConditionalOnMissingBean
|
||||
public DataSource dataSource(Environment environment) {
|
||||
return new EmbeddedDataSourceFactory(environment).getEmbeddedDatabase();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2022 the original author or authors.
|
||||
* Copyright 2012-2024 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.
|
||||
@@ -32,7 +32,7 @@ import org.springframework.web.client.RestTemplate;
|
||||
* @see AutoConfigureMockRestServiceServer
|
||||
*/
|
||||
@AutoConfiguration(after = RestTemplateAutoConfiguration.class)
|
||||
@ConditionalOnProperty(prefix = "spring.test.webclient", name = "register-rest-template")
|
||||
@ConditionalOnProperty("spring.test.webclient.register-rest-template")
|
||||
public class WebClientRestTemplateAutoConfiguration {
|
||||
|
||||
@Bean
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2022 the original author or authors.
|
||||
* Copyright 2012-2024 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.
|
||||
@@ -34,7 +34,7 @@ import org.springframework.ws.client.core.WebServiceTemplate;
|
||||
* @see AutoConfigureWebServiceClient
|
||||
*/
|
||||
@AutoConfiguration(after = WebServiceTemplateAutoConfiguration.class)
|
||||
@ConditionalOnProperty(prefix = "spring.test.webservice.client", name = "register-web-service-template")
|
||||
@ConditionalOnProperty("spring.test.webservice.client.register-web-service-template")
|
||||
@ConditionalOnClass(WebServiceTemplate.class)
|
||||
@ConditionalOnBean(WebServiceTemplateBuilder.class)
|
||||
public class WebServiceClientTemplateAutoConfiguration {
|
||||
|
||||
Reference in New Issue
Block a user