Commit 2e0481ca authored by Stephane Nicoll's avatar Stephane Nicoll

Remove useless overrides of ConditionalOnProperty#matchIfMissing

Closes gh-26432
parent 05129927
...@@ -52,8 +52,7 @@ public class AopAutoConfiguration { ...@@ -52,8 +52,7 @@ public class AopAutoConfiguration {
@Configuration(proxyBeanMethods = false) @Configuration(proxyBeanMethods = false)
@EnableAspectJAutoProxy(proxyTargetClass = false) @EnableAspectJAutoProxy(proxyTargetClass = false)
@ConditionalOnProperty(prefix = "spring.aop", name = "proxy-target-class", havingValue = "false", @ConditionalOnProperty(prefix = "spring.aop", name = "proxy-target-class", havingValue = "false")
matchIfMissing = false)
static class JdkDynamicAutoProxyConfiguration { static class JdkDynamicAutoProxyConfiguration {
} }
......
...@@ -405,7 +405,7 @@ public class FlywayAutoConfiguration { ...@@ -405,7 +405,7 @@ public class FlywayAutoConfiguration {
} }
@ConditionalOnProperty(prefix = "spring.flyway", name = "url", matchIfMissing = false) @ConditionalOnProperty(prefix = "spring.flyway", name = "url")
private static final class FlywayUrlCondition { private static final class FlywayUrlCondition {
} }
......
/* /*
* Copyright 2012-2020 the original author or authors. * Copyright 2012-2021 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.
...@@ -49,7 +49,7 @@ import org.springframework.context.annotation.Configuration; ...@@ -49,7 +49,7 @@ import org.springframework.context.annotation.Configuration;
@Configuration(proxyBeanMethods = false) @Configuration(proxyBeanMethods = false)
@ConditionalOnWebApplication(type = Type.SERVLET) @ConditionalOnWebApplication(type = Type.SERVLET)
@ConditionalOnClass(WebServlet.class) @ConditionalOnClass(WebServlet.class)
@ConditionalOnProperty(prefix = "spring.h2.console", name = "enabled", havingValue = "true", matchIfMissing = false) @ConditionalOnProperty(prefix = "spring.h2.console", name = "enabled", havingValue = "true")
@AutoConfigureAfter(DataSourceAutoConfiguration.class) @AutoConfigureAfter(DataSourceAutoConfiguration.class)
@EnableConfigurationProperties(H2ConsoleProperties.class) @EnableConfigurationProperties(H2ConsoleProperties.class)
public class H2ConsoleAutoConfiguration { public class H2ConsoleAutoConfiguration {
......
...@@ -158,7 +158,7 @@ public class LiquibaseAutoConfiguration { ...@@ -158,7 +158,7 @@ public class LiquibaseAutoConfiguration {
} }
@ConditionalOnProperty(prefix = "spring.liquibase", name = "url", matchIfMissing = false) @ConditionalOnProperty(prefix = "spring.liquibase", name = "url")
private static final class LiquibaseUrlCondition { private static final class LiquibaseUrlCondition {
} }
......
/* /*
* Copyright 2012-2019 the original author or authors. * Copyright 2012-2021 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.
...@@ -88,8 +88,7 @@ public class TransactionAutoConfiguration { ...@@ -88,8 +88,7 @@ public class TransactionAutoConfiguration {
@Configuration(proxyBeanMethods = false) @Configuration(proxyBeanMethods = false)
@EnableTransactionManagement(proxyTargetClass = false) @EnableTransactionManagement(proxyTargetClass = false)
@ConditionalOnProperty(prefix = "spring.aop", name = "proxy-target-class", havingValue = "false", @ConditionalOnProperty(prefix = "spring.aop", name = "proxy-target-class", havingValue = "false")
matchIfMissing = false)
public static class JdkDynamicAutoProxyConfiguration { public static class JdkDynamicAutoProxyConfiguration {
} }
......
...@@ -102,7 +102,7 @@ public class WebFluxAutoConfiguration { ...@@ -102,7 +102,7 @@ public class WebFluxAutoConfiguration {
@Bean @Bean
@ConditionalOnMissingBean(HiddenHttpMethodFilter.class) @ConditionalOnMissingBean(HiddenHttpMethodFilter.class)
@ConditionalOnProperty(prefix = "spring.webflux.hiddenmethod.filter", name = "enabled", matchIfMissing = false) @ConditionalOnProperty(prefix = "spring.webflux.hiddenmethod.filter", name = "enabled")
public OrderedHiddenHttpMethodFilter hiddenHttpMethodFilter() { public OrderedHiddenHttpMethodFilter hiddenHttpMethodFilter() {
return new OrderedHiddenHttpMethodFilter(); return new OrderedHiddenHttpMethodFilter();
} }
......
...@@ -162,7 +162,7 @@ public class WebMvcAutoConfiguration { ...@@ -162,7 +162,7 @@ public class WebMvcAutoConfiguration {
@Bean @Bean
@ConditionalOnMissingBean(HiddenHttpMethodFilter.class) @ConditionalOnMissingBean(HiddenHttpMethodFilter.class)
@ConditionalOnProperty(prefix = "spring.mvc.hiddenmethod.filter", name = "enabled", matchIfMissing = false) @ConditionalOnProperty(prefix = "spring.mvc.hiddenmethod.filter", name = "enabled")
public OrderedHiddenHttpMethodFilter hiddenHttpMethodFilter() { public OrderedHiddenHttpMethodFilter hiddenHttpMethodFilter() {
return new OrderedHiddenHttpMethodFilter(); return new OrderedHiddenHttpMethodFilter();
} }
......
/* /*
* Copyright 2012-2019 the original author or authors. * Copyright 2012-2021 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.
...@@ -299,7 +299,7 @@ class ConditionalOnPropertyTests { ...@@ -299,7 +299,7 @@ class ConditionalOnPropertyTests {
@Configuration(proxyBeanMethods = false) @Configuration(proxyBeanMethods = false)
// i.e ${simple.myProperty:false} // i.e ${simple.myProperty:false}
@ConditionalOnProperty(prefix = "simple", name = "my-property", havingValue = "true", matchIfMissing = false) @ConditionalOnProperty(prefix = "simple", name = "my-property", havingValue = "true")
static class DisabledIfNotConfiguredOtherwiseConfig { static class DisabledIfNotConfiguredOtherwiseConfig {
@Bean @Bean
...@@ -399,7 +399,7 @@ class ConditionalOnPropertyTests { ...@@ -399,7 +399,7 @@ class ConditionalOnPropertyTests {
@Configuration(proxyBeanMethods = false) @Configuration(proxyBeanMethods = false)
@ConditionalOnMyFeature @ConditionalOnMyFeature
@ConditionalOnProperty(prefix = "my.other.feature", name = "enabled", havingValue = "true", matchIfMissing = false) @ConditionalOnProperty(prefix = "my.other.feature", name = "enabled", havingValue = "true")
static class MetaAnnotationAndDirectAnnotation { static class MetaAnnotationAndDirectAnnotation {
@Bean @Bean
...@@ -411,7 +411,7 @@ class ConditionalOnPropertyTests { ...@@ -411,7 +411,7 @@ class ConditionalOnPropertyTests {
@Retention(RetentionPolicy.RUNTIME) @Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.TYPE, ElementType.METHOD }) @Target({ ElementType.TYPE, ElementType.METHOD })
@ConditionalOnProperty(prefix = "my.feature", name = "enabled", havingValue = "true", matchIfMissing = false) @ConditionalOnProperty(prefix = "my.feature", name = "enabled", havingValue = "true")
@interface ConditionalOnMyFeature { @interface ConditionalOnMyFeature {
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment