Merge pull request #43917 from quaff

* pr/43917:
  Polish 'Refactor `@ConfigurationProperties` that only use `prefix`'
  Refactor `@ConfigurationProperties` that only use `prefix`
  Enforce `@ConfigurationProperties` don't use only `prefix`

Closes gh-43917
This commit is contained in:
Phillip Webb 2025-01-24 15:03:57 -08:00
commit 62a0e5497a
174 changed files with 419 additions and 383 deletions

View File

@ -39,6 +39,7 @@ import com.tngtech.archunit.core.domain.JavaMethod;
import com.tngtech.archunit.core.domain.JavaParameter;
import com.tngtech.archunit.core.domain.JavaType;
import com.tngtech.archunit.core.domain.properties.CanBeAnnotated;
import com.tngtech.archunit.core.domain.properties.HasAnnotations;
import com.tngtech.archunit.core.domain.properties.HasName;
import com.tngtech.archunit.core.domain.properties.HasOwner.Predicates.With;
import com.tngtech.archunit.core.domain.properties.HasParameterTypes;
@ -97,7 +98,9 @@ public abstract class ArchitectureCheck extends DefaultTask {
noClassesShouldLoadResourcesUsingResourceUtils(), noClassesShouldCallStringToUpperCaseWithoutLocale(),
noClassesShouldCallStringToLowerCaseWithoutLocale(),
conditionalOnMissingBeanShouldNotSpecifyOnlyATypeThatIsTheSameAsMethodReturnType(),
enumSourceShouldNotSpecifyOnlyATypeThatIsTheSameAsMethodParameterType());
enumSourceShouldNotSpecifyOnlyATypeThatIsTheSameAsMethodParameterType(),
classLevelConfigurationPropertiesShouldNotSpecifyOnlyPrefixAttribute(),
methodLevelConfigurationPropertiesShouldNotSpecifyOnlyPrefixAttribute());
getRules().addAll(getProhibitObjectsRequireNonNull()
.map((prohibit) -> prohibit ? noClassesShouldCallObjectsRequireNonNull() : Collections.emptyList()));
getRuleDescriptions().set(getRules().map((rules) -> rules.stream().map(ArchRule::getDescription).toList()));
@ -344,6 +347,39 @@ public abstract class ArchitectureCheck extends DefaultTask {
};
}
private ArchRule classLevelConfigurationPropertiesShouldNotSpecifyOnlyPrefixAttribute() {
return ArchRuleDefinition.classes()
.that()
.areAnnotatedWith("org.springframework.boot.context.properties.ConfigurationProperties")
.should(notSpecifyOnlyPrefixAttributeOfConfigurationProperties())
.allowEmptyShould(true);
}
private ArchRule methodLevelConfigurationPropertiesShouldNotSpecifyOnlyPrefixAttribute() {
return ArchRuleDefinition.methods()
.that()
.areAnnotatedWith("org.springframework.boot.context.properties.ConfigurationProperties")
.should(notSpecifyOnlyPrefixAttributeOfConfigurationProperties())
.allowEmptyShould(true);
}
private ArchCondition<? super HasAnnotations<?>> notSpecifyOnlyPrefixAttributeOfConfigurationProperties() {
return new ArchCondition<>("not specify only prefix attribute of @ConfigurationProperties") {
@Override
public void check(HasAnnotations<?> item, ConditionEvents events) {
JavaAnnotation<?> configurationProperties = item
.getAnnotationOfType("org.springframework.boot.context.properties.ConfigurationProperties");
Map<String, Object> properties = configurationProperties.getProperties();
if (properties.size() == 1 && properties.containsKey("prefix")) {
events.add(SimpleConditionEvent.violated(item, configurationProperties.getDescription()
+ " should specify implicit 'value' attribute other than explicit 'prefix' attribute"));
}
}
};
}
public void setClasses(FileCollection classes) {
this.classes = classes;
}

View File

@ -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.
@ -33,7 +33,7 @@ import org.springframework.web.cors.CorsConfiguration;
* @author Andy Wilkinson
* @since 2.0.0
*/
@ConfigurationProperties(prefix = "management.endpoints.web.cors")
@ConfigurationProperties("management.endpoints.web.cors")
public class CorsEndpointProperties {
/**

View File

@ -32,7 +32,7 @@ import org.springframework.util.StringUtils;
* @author Phillip Webb
* @since 2.0.0
*/
@ConfigurationProperties(prefix = "management.endpoints.web")
@ConfigurationProperties("management.endpoints.web")
public class WebEndpointProperties {
private final Exposure exposure = new Exposure();

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2020 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.
@ -25,7 +25,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
* @author Julio Gomez
* @since 2.4.0
*/
@ConfigurationProperties(prefix = "management.health.db")
@ConfigurationProperties("management.health.db")
public class DataSourceHealthIndicatorProperties {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 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.
@ -27,7 +27,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
* @author Stephane Nicoll
* @since 2.0.0
*/
@ConfigurationProperties(prefix = "management.endpoint.logfile")
@ConfigurationProperties("management.endpoint.logfile")
public class LogFileWebEndpointProperties {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2022 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.
@ -28,7 +28,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
* @author Stephane Nicoll
* @since 2.1.0
*/
@ConfigurationProperties(prefix = "management.appoptics.metrics.export")
@ConfigurationProperties("management.appoptics.metrics.export")
public class AppOpticsProperties extends StepRegistryProperties {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 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.
@ -28,7 +28,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
* @author Stephane Nicoll
* @since 2.0.0
*/
@ConfigurationProperties(prefix = "management.atlas.metrics.export")
@ConfigurationProperties("management.atlas.metrics.export")
public class AtlasProperties {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2022 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.
@ -27,7 +27,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
* @author Stephane Nicoll
* @since 2.0.0
*/
@ConfigurationProperties(prefix = "management.datadog.metrics.export")
@ConfigurationProperties("management.datadog.metrics.export")
public class DatadogProperties extends StepRegistryProperties {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 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.
@ -29,7 +29,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
* @author Georg Pirklbauer
* @since 2.1.0
*/
@ConfigurationProperties(prefix = "management.dynatrace.metrics.export")
@ConfigurationProperties("management.dynatrace.metrics.export")
public class DynatraceProperties extends StepRegistryProperties {
private final V1 v1 = new V1();

View File

@ -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.
@ -26,7 +26,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
* @author Andy Wilkinson
* @since 2.1.0
*/
@ConfigurationProperties(prefix = "management.elastic.metrics.export")
@ConfigurationProperties("management.elastic.metrics.export")
public class ElasticProperties extends StepRegistryProperties {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2022 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.
@ -31,7 +31,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
* @author Stephane Nicoll
* @since 2.0.0
*/
@ConfigurationProperties(prefix = "management.ganglia.metrics.export")
@ConfigurationProperties("management.ganglia.metrics.export")
public class GangliaProperties {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2022 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.
@ -32,7 +32,7 @@ import org.springframework.util.ObjectUtils;
* @author Stephane Nicoll
* @since 2.0.0
*/
@ConfigurationProperties(prefix = "management.graphite.metrics.export")
@ConfigurationProperties("management.graphite.metrics.export")
public class GraphiteProperties {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2022 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.
@ -30,7 +30,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
* @author Andy Wilkinson
* @since 2.1.0
*/
@ConfigurationProperties(prefix = "management.humio.metrics.export")
@ConfigurationProperties("management.humio.metrics.export")
public class HumioProperties extends StepRegistryProperties {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2022 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.
@ -30,7 +30,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
* @author Stephane Nicoll
* @since 2.0.0
*/
@ConfigurationProperties(prefix = "management.influx.metrics.export")
@ConfigurationProperties("management.influx.metrics.export")
public class InfluxProperties extends StepRegistryProperties {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2022 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.
@ -28,7 +28,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
* @author Stephane Nicoll
* @since 2.0.0
*/
@ConfigurationProperties(prefix = "management.jmx.metrics.export")
@ConfigurationProperties("management.jmx.metrics.export")
public class JmxProperties {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2022 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.
@ -26,7 +26,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
* @author Stephane Nicoll
* @since 2.1.0
*/
@ConfigurationProperties(prefix = "management.kairos.metrics.export")
@ConfigurationProperties("management.kairos.metrics.export")
public class KairosProperties extends StepRegistryProperties {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2022 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.
@ -31,7 +31,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
* @author Neil Powell
* @since 2.0.0
*/
@ConfigurationProperties(prefix = "management.newrelic.metrics.export")
@ConfigurationProperties("management.newrelic.metrics.export")
public class NewRelicProperties extends StepRegistryProperties {
/**

View File

@ -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.
@ -34,7 +34,7 @@ import org.springframework.boot.context.properties.DeprecatedConfigurationProper
* @author Jonatan Ivanov
* @since 3.4.0
*/
@ConfigurationProperties(prefix = "management.otlp.metrics.export")
@ConfigurationProperties("management.otlp.metrics.export")
public class OtlpMetricsProperties extends StepRegistryProperties {
/**

View File

@ -31,7 +31,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
* @author Stephane Nicoll
* @since 2.0.0
*/
@ConfigurationProperties(prefix = "management.prometheus.metrics.export")
@ConfigurationProperties("management.prometheus.metrics.export")
public class PrometheusProperties {
/**

View File

@ -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.
@ -30,7 +30,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
* @author Stephane Nicoll
* @since 2.0.0
*/
@ConfigurationProperties(prefix = "management.signalfx.metrics.export")
@ConfigurationProperties("management.signalfx.metrics.export")
public class SignalFxProperties extends StepRegistryProperties {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2022 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.
@ -31,7 +31,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
* @author Stephane Nicoll
* @since 2.0.0
*/
@ConfigurationProperties(prefix = "management.simple.metrics.export")
@ConfigurationProperties("management.simple.metrics.export")
public class SimpleProperties {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 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.
@ -29,7 +29,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
* @author Stephane Nicoll
* @since 2.3.0
*/
@ConfigurationProperties(prefix = "management.stackdriver.metrics.export")
@ConfigurationProperties("management.stackdriver.metrics.export")
public class StackdriverProperties extends StepRegistryProperties {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2022 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.
@ -31,7 +31,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
* @author Stephane Nicoll
* @since 2.0.0
*/
@ConfigurationProperties(prefix = "management.statsd.metrics.export")
@ConfigurationProperties("management.statsd.metrics.export")
public class StatsdProperties {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 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.
@ -27,7 +27,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
* @author Moritz Halbritter
* @since 3.2.0
*/
@ConfigurationProperties(prefix = "management.opentelemetry")
@ConfigurationProperties("management.opentelemetry")
public class OpenTelemetryProperties {
/**

View File

@ -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.
@ -27,7 +27,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
* @author Jonatan Ivanov
* @since 3.4.0
*/
@ConfigurationProperties(prefix = "management.health.ssl")
@ConfigurationProperties("management.health.ssl")
public class SslHealthIndicatorProperties {
/**

View File

@ -30,7 +30,7 @@ import org.springframework.util.unit.DataSize;
* @author Stephane Nicoll
* @since 1.2.0
*/
@ConfigurationProperties(prefix = "management.health.diskspace")
@ConfigurationProperties("management.health.diskspace")
public class DiskSpaceHealthIndicatorProperties {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 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.
@ -39,7 +39,7 @@ import org.springframework.util.unit.DataSize;
* @author Glenn Oppegard
* @since 3.0.0
*/
@ConfigurationProperties(prefix = "management.wavefront")
@ConfigurationProperties("management.wavefront")
public class WavefrontProperties {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2022 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.
@ -32,7 +32,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
* @author Stephane Nicoll
* @since 2.0.0
*/
@ConfigurationProperties(prefix = "management.httpexchanges")
@ConfigurationProperties("management.httpexchanges")
public class HttpExchangesProperties {
private final Recording recording = new Recording();

View File

@ -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.
@ -216,7 +216,7 @@ class DataSourceHealthContributorAutoConfigurationTests {
static class DataSourceConfig {
@Bean
@ConfigurationProperties(prefix = "spring.datasource.test")
@ConfigurationProperties("spring.datasource.test")
DataSource testDataSource() {
return DataSourceBuilder.create()
.type(org.apache.tomcat.jdbc.pool.DataSource.class)

View File

@ -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.
@ -28,7 +28,7 @@ import org.springframework.util.MimeType;
* @author Moritz Halbritter
* @since 3.3.0
*/
@ConfigurationProperties(prefix = "management.endpoint.sbom")
@ConfigurationProperties("management.endpoint.sbom")
public class SbomProperties {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 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.
@ -163,13 +163,13 @@ class ConfigurationPropertiesReportEndpointFilteringTests {
static class BaseConfiguration {
@Bean
@ConfigurationProperties(prefix = "foo.primary")
@ConfigurationProperties("foo.primary")
Foo primaryFoo() {
return new Foo();
}
@Bean
@ConfigurationProperties(prefix = "foo.secondary")
@ConfigurationProperties("foo.secondary")
Foo secondaryFoo() {
return new Foo();
}
@ -190,7 +190,7 @@ class ConfigurationPropertiesReportEndpointFilteringTests {
}
@ConfigurationProperties(prefix = "only.bar")
@ConfigurationProperties("only.bar")
public static class Bar {
private String name = "123456";

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 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.
@ -89,13 +89,13 @@ class ConfigurationPropertiesReportEndpointMethodAnnotationsTests {
}
@Bean
@ConfigurationProperties(prefix = "first")
@ConfigurationProperties("first")
Foo foo() {
return new Foo();
}
@Bean
@ConfigurationProperties(prefix = "other")
@ConfigurationProperties("other")
Foo other() {
return new Foo();
}
@ -112,7 +112,7 @@ class ConfigurationPropertiesReportEndpointMethodAnnotationsTests {
}
@Bean
@ConfigurationProperties(prefix = "other")
@ConfigurationProperties("other")
Bar bar() {
return new Bar();
}
@ -133,7 +133,7 @@ class ConfigurationPropertiesReportEndpointMethodAnnotationsTests {
}
@ConfigurationProperties(prefix = "test")
@ConfigurationProperties("test")
public static class Bar {
private String name = "654321";

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 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.
@ -111,7 +111,7 @@ class ConfigurationPropertiesReportEndpointParentTests {
}
@Bean
@ConfigurationProperties(prefix = "other")
@ConfigurationProperties("other")
OtherProperties otherProperties() {
return new OtherProperties();
}
@ -122,7 +122,7 @@ class ConfigurationPropertiesReportEndpointParentTests {
}
@ConfigurationProperties(prefix = "test")
@ConfigurationProperties("test")
static class TestProperties {
private String myTestProperty = "654321";

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 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.
@ -329,7 +329,7 @@ class ConfigurationPropertiesReportEndpointSerializationTests {
static class FooConfig {
@Bean
@ConfigurationProperties(prefix = "foo")
@ConfigurationProperties("foo")
Foo foo() {
return new Foo();
}
@ -341,7 +341,7 @@ class ConfigurationPropertiesReportEndpointSerializationTests {
static class SelfReferentialConfig {
@Bean
@ConfigurationProperties(prefix = "foo")
@ConfigurationProperties("foo")
SelfReferential foo() {
return new SelfReferential();
}
@ -353,7 +353,7 @@ class ConfigurationPropertiesReportEndpointSerializationTests {
static class MetadataCycleConfig {
@Bean
@ConfigurationProperties(prefix = "bar")
@ConfigurationProperties("bar")
SelfReferential foo() {
return new SelfReferential();
}
@ -365,7 +365,7 @@ class ConfigurationPropertiesReportEndpointSerializationTests {
static class MapConfig {
@Bean
@ConfigurationProperties(prefix = "foo")
@ConfigurationProperties("foo")
MapHolder foo() {
return new MapHolder();
}
@ -377,7 +377,7 @@ class ConfigurationPropertiesReportEndpointSerializationTests {
static class ListConfig {
@Bean
@ConfigurationProperties(prefix = "foo")
@ConfigurationProperties("foo")
ListHolder foo() {
return new ListHolder();
}
@ -389,7 +389,7 @@ class ConfigurationPropertiesReportEndpointSerializationTests {
static class MetadataMapConfig {
@Bean
@ConfigurationProperties(prefix = "spam")
@ConfigurationProperties("spam")
MapHolder foo() {
return new MapHolder();
}
@ -401,7 +401,7 @@ class ConfigurationPropertiesReportEndpointSerializationTests {
static class AddressedConfig {
@Bean
@ConfigurationProperties(prefix = "foo")
@ConfigurationProperties("foo")
Addressed foo() {
return new Addressed();
}
@ -413,7 +413,7 @@ class ConfigurationPropertiesReportEndpointSerializationTests {
static class InitializedMapAndListPropertiesConfig {
@Bean
@ConfigurationProperties(prefix = "foo")
@ConfigurationProperties("foo")
InitializedMapAndListProperties foo() {
return new InitializedMapAndListProperties();
}
@ -569,7 +569,7 @@ class ConfigurationPropertiesReportEndpointSerializationTests {
@Bean
// gh-11037
@ConfigurationProperties(prefix = "cycle")
@ConfigurationProperties("cycle")
Cycle cycle() {
return new Cycle();
}
@ -586,7 +586,7 @@ class ConfigurationPropertiesReportEndpointSerializationTests {
}
@Bean
@ConfigurationProperties(prefix = "test.datasource")
@ConfigurationProperties("test.datasource")
HikariDataSource hikariDataSource() {
return new HikariDataSource();
}

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 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.
@ -457,7 +457,7 @@ class ConfigurationPropertiesReportEndpointTests {
}
@ConfigurationProperties(prefix = "test")
@ConfigurationProperties("test")
public static class TestProperties {
private String dbPassword = "123456";
@ -524,7 +524,7 @@ class ConfigurationPropertiesReportEndpointTests {
}
@ConfigurationProperties(prefix = "immutable")
@ConfigurationProperties("immutable")
public static class ImmutableProperties {
private final String dbPassword;
@ -574,7 +574,7 @@ class ConfigurationPropertiesReportEndpointTests {
}
@ConfigurationProperties(prefix = "multiconstructor")
@ConfigurationProperties("multiconstructor")
public static class MultiConstructorProperties {
private final String name;
@ -613,7 +613,7 @@ class ConfigurationPropertiesReportEndpointTests {
}
@ConfigurationProperties(prefix = "autowired")
@ConfigurationProperties("autowired")
public static class AutowiredProperties {
private final String name;

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 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.
@ -116,13 +116,13 @@ class ConfigurationPropertiesReportEndpointWebIntegrationTests {
}
@Bean
@ConfigurationProperties(prefix = "com.foo")
@ConfigurationProperties("com.foo")
Foo fooDotCom() {
return new Foo();
}
@Bean
@ConfigurationProperties(prefix = "com.bar")
@ConfigurationProperties("com.bar")
Bar barDotCom() {
return new Bar();
}

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2022 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.
@ -26,7 +26,7 @@ import org.springframework.validation.annotation.Validated;
* @author Madhura Bhave
*/
@Validated
@ConfigurationProperties(prefix = "validated")
@ConfigurationProperties("validated")
public class ValidatedConstructorBindingProperties {
private final String name;

View File

@ -51,7 +51,7 @@ import org.springframework.util.unit.DataSize;
* @author Yanming Zhou
* @since 1.0.0
*/
@ConfigurationProperties(prefix = "spring.rabbitmq")
@ConfigurationProperties("spring.rabbitmq")
public class RabbitProperties {
private static final int DEFAULT_PORT = 5672;

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 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.
@ -29,7 +29,7 @@ import org.springframework.transaction.annotation.Isolation;
* @author Mukul Kumar Chaundhyan
* @since 1.2.0
*/
@ConfigurationProperties(prefix = "spring.batch")
@ConfigurationProperties("spring.batch")
public class BatchProperties {
private final Job job = new Job();

View File

@ -32,7 +32,7 @@ import org.springframework.util.Assert;
* @author Ryon Day
* @since 1.3.0
*/
@ConfigurationProperties(prefix = "spring.cache")
@ConfigurationProperties("spring.cache")
public class CacheProperties {
/**

View File

@ -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.
@ -34,7 +34,7 @@ import org.springframework.core.io.Resource;
* @author Scott Frederick
* @since 1.3.0
*/
@ConfigurationProperties(prefix = "spring.cassandra")
@ConfigurationProperties("spring.cassandra")
public class CassandraProperties {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 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.
@ -25,7 +25,7 @@ import org.springframework.util.unit.DataSize;
* @author Brian Clozel
* @since 2.2.1
*/
@ConfigurationProperties(prefix = "spring.codec")
@ConfigurationProperties("spring.codec")
public class CodecProperties {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2020 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.
@ -26,7 +26,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
* @author Andy Wilkinson
* @since 2.3.0
*/
@ConfigurationProperties(prefix = "spring.lifecycle")
@ConfigurationProperties("spring.lifecycle")
public class LifecycleProperties {
/**

View File

@ -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.
@ -35,7 +35,7 @@ import org.springframework.core.io.Resource;
* @author Misagh Moayyed
* @since 2.0.0
*/
@ConfigurationProperties(prefix = "spring.messages")
@ConfigurationProperties("spring.messages")
public class MessageSourceProperties {
/**

View File

@ -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.
@ -32,7 +32,7 @@ import org.springframework.util.StringUtils;
* @author Scott Frederick
* @since 1.4.0
*/
@ConfigurationProperties(prefix = "spring.couchbase")
@ConfigurationProperties("spring.couchbase")
public class CouchbaseProperties {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2022 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.
@ -24,7 +24,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
* @author Stephane Nicoll
* @since 1.4.0
*/
@ConfigurationProperties(prefix = "spring.data.couchbase")
@ConfigurationProperties("spring.data.couchbase")
public class CouchbaseDataProperties {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2024-2024 the original author or authors.
* Copyright 2024-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.
@ -24,7 +24,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
* @author Jens Schauder
* @since 3.3.0
*/
@ConfigurationProperties(prefix = "spring.data.jdbc")
@ConfigurationProperties("spring.data.jdbc")
public class JdbcDataProperties {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2020 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.
@ -24,7 +24,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
* @author Michael J. Simons
* @since 2.4.0
*/
@ConfigurationProperties(prefix = "spring.data.neo4j")
@ConfigurationProperties("spring.data.neo4j")
public class Neo4jDataProperties {
/**

View File

@ -34,7 +34,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
* @author Yanming Zhou
* @since 1.0.0
*/
@ConfigurationProperties(prefix = "spring.data.redis")
@ConfigurationProperties("spring.data.redis")
public class RedisProperties {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 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.
@ -28,7 +28,7 @@ import org.springframework.http.MediaType;
* @author Stephane Nicoll
* @since 1.3.0
*/
@ConfigurationProperties(prefix = "spring.data.rest")
@ConfigurationProperties("spring.data.rest")
public class RepositoryRestProperties {
/**

View File

@ -40,7 +40,7 @@ import org.springframework.boot.convert.DurationUnit;
* @author Chris Bono
* @since 1.1.0
*/
@ConfigurationProperties(prefix = "spring.flyway")
@ConfigurationProperties("spring.flyway")
public class FlywayProperties {
/**

View File

@ -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.
@ -29,7 +29,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
* @author Andy Wilkinson
* @since 1.1.0
*/
@ConfigurationProperties(prefix = "spring.freemarker")
@ConfigurationProperties("spring.freemarker")
public class FreeMarkerProperties extends AbstractTemplateViewResolverProperties {
public static final String DEFAULT_TEMPLATE_LOADER_PATH = "classpath:/templates/";

View File

@ -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.
@ -34,7 +34,7 @@ import org.springframework.web.cors.CorsConfiguration;
* @author Brian Clozel
* @since 2.7.0
*/
@ConfigurationProperties(prefix = "spring.graphql.cors")
@ConfigurationProperties("spring.graphql.cors")
public class GraphQlCorsProperties {
/**

View File

@ -28,7 +28,7 @@ import org.springframework.core.io.Resource;
* @author Brian Clozel
* @since 2.7.0
*/
@ConfigurationProperties(prefix = "spring.graphql")
@ConfigurationProperties("spring.graphql")
public class GraphQlProperties {
/**

View File

@ -109,7 +109,7 @@ public class GroovyTemplateAutoConfiguration {
@Bean
@ConditionalOnMissingBean(GroovyMarkupConfig.class)
@ConfigurationProperties(prefix = "spring.groovy.template.configuration")
@ConfigurationProperties("spring.groovy.template.configuration")
public GroovyMarkupConfigurer groovyMarkupConfigurer(ObjectProvider<MarkupTemplateEngine> templateEngine) {
GroovyMarkupConfigurer configurer = new GroovyMarkupConfigurer();
configurer.setResourceLoaderPath(this.properties.getResourceLoaderPath());

View File

@ -29,7 +29,7 @@ import org.springframework.boot.context.properties.DeprecatedConfigurationProper
* @author Ivan Golovko
* @since 2.0.0
*/
@ConfigurationProperties(prefix = "spring.gson")
@ConfigurationProperties("spring.gson")
public class GsonProperties {
/**

View File

@ -27,7 +27,7 @@ import org.springframework.util.Assert;
* @author Stephane Nicoll
* @since 1.3.0
*/
@ConfigurationProperties(prefix = "spring.h2.console")
@ConfigurationProperties("spring.h2.console")
public class H2ConsoleProperties {
/**

View File

@ -25,7 +25,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
* @author Andy Wilkinson
* @since 1.2.1
*/
@ConfigurationProperties(prefix = "spring.hateoas")
@ConfigurationProperties("spring.hateoas")
public class HateoasProperties {
/**

View File

@ -26,7 +26,7 @@ import org.springframework.util.Assert;
* @author Stephane Nicoll
* @since 1.3.0
*/
@ConfigurationProperties(prefix = "spring.hazelcast")
@ConfigurationProperties("spring.hazelcast")
public class HazelcastProperties {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 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.
@ -29,7 +29,7 @@ import org.springframework.core.io.Resource;
* @author Stephane Nicoll
* @since 1.4.0
*/
@ConfigurationProperties(prefix = "spring.info")
@ConfigurationProperties("spring.info")
public class ProjectInfoProperties {
private final Build build = new Build();

View File

@ -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.
@ -32,7 +32,7 @@ import org.springframework.boot.sql.init.DatabaseInitializationMode;
* @author Artem Bilan
* @since 2.0.0
*/
@ConfigurationProperties(prefix = "spring.integration")
@ConfigurationProperties("spring.integration")
public class IntegrationProperties {
private final Channel channel = new Channel();

View File

@ -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.
@ -43,7 +43,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
* @author Eddú Meléndez
* @since 1.2.0
*/
@ConfigurationProperties(prefix = "spring.jackson")
@ConfigurationProperties("spring.jackson")
public class JacksonProperties {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 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.
@ -77,7 +77,7 @@ abstract class DataSourceConfiguration {
}
@Bean
@ConfigurationProperties(prefix = "spring.datasource.tomcat")
@ConfigurationProperties("spring.datasource.tomcat")
org.apache.tomcat.jdbc.pool.DataSource dataSource(DataSourceProperties properties,
JdbcConnectionDetails connectionDetails) {
Class<? extends DataSource> dataSourceType = org.apache.tomcat.jdbc.pool.DataSource.class;
@ -112,7 +112,7 @@ abstract class DataSourceConfiguration {
}
@Bean
@ConfigurationProperties(prefix = "spring.datasource.hikari")
@ConfigurationProperties("spring.datasource.hikari")
HikariDataSource dataSource(DataSourceProperties properties, JdbcConnectionDetails connectionDetails) {
HikariDataSource dataSource = createDataSource(connectionDetails, HikariDataSource.class,
properties.getClassLoader());
@ -141,7 +141,7 @@ abstract class DataSourceConfiguration {
}
@Bean
@ConfigurationProperties(prefix = "spring.datasource.dbcp2")
@ConfigurationProperties("spring.datasource.dbcp2")
org.apache.commons.dbcp2.BasicDataSource dataSource(DataSourceProperties properties,
JdbcConnectionDetails connectionDetails) {
Class<? extends DataSource> dataSourceType = org.apache.commons.dbcp2.BasicDataSource.class;
@ -167,7 +167,7 @@ abstract class DataSourceConfiguration {
}
@Bean
@ConfigurationProperties(prefix = "spring.datasource.oracleucp")
@ConfigurationProperties("spring.datasource.oracleucp")
PoolDataSourceImpl dataSource(DataSourceProperties properties, JdbcConnectionDetails connectionDetails)
throws SQLException {
PoolDataSourceImpl dataSource = createDataSource(connectionDetails, PoolDataSourceImpl.class,

View File

@ -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.
@ -44,7 +44,7 @@ import org.springframework.util.StringUtils;
* @author Scott Frederick
* @since 1.1.0
*/
@ConfigurationProperties(prefix = "spring.datasource")
@ConfigurationProperties("spring.datasource")
public class DataSourceProperties implements BeanClassLoaderAware, InitializingBean {
private ClassLoader classLoader;

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 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.
@ -29,7 +29,7 @@ import org.springframework.boot.convert.DurationUnit;
* @author Stephane Nicoll
* @since 2.0.0
*/
@ConfigurationProperties(prefix = "spring.jdbc")
@ConfigurationProperties("spring.jdbc")
public class JdbcProperties {
private final Template template = new Template();

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2022 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.
@ -29,7 +29,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
* @author Stephane Nicoll
* @since 1.2.0
*/
@ConfigurationProperties(prefix = "spring.jersey")
@ConfigurationProperties("spring.jersey")
public class JerseyProperties {
/**

View File

@ -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.
@ -31,7 +31,7 @@ import org.springframework.boot.context.properties.DeprecatedConfigurationProper
* @author Vedran Pavic
* @since 1.0.0
*/
@ConfigurationProperties(prefix = "spring.jms")
@ConfigurationProperties("spring.jms")
public class JmsProperties {
/**

View File

@ -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.
@ -34,7 +34,7 @@ import org.springframework.boot.context.properties.NestedConfigurationProperty;
* @author Eddú Meléndez
* @since 3.1.0
*/
@ConfigurationProperties(prefix = "spring.activemq")
@ConfigurationProperties("spring.activemq")
public class ActiveMQProperties {
private static final String DEFAULT_EMBEDDED_BROKER_URL = "vm://localhost?broker.persistent=false";

View File

@ -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.
@ -35,7 +35,7 @@ import org.springframework.boot.context.properties.NestedConfigurationProperty;
* @author Justin Bertram
* @since 1.3.0
*/
@ConfigurationProperties(prefix = "spring.artemis")
@ConfigurationProperties("spring.artemis")
public class ArtemisProperties {
/**

View File

@ -25,7 +25,7 @@ import org.springframework.jmx.support.RegistrationPolicy;
* @author Scott Frederick
* @since 2.7.0
*/
@ConfigurationProperties(prefix = "spring.jmx")
@ConfigurationProperties("spring.jmx")
public class JmxProperties {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2022 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.
@ -29,7 +29,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
* @author Michael Simons
* @since 1.3.0
*/
@ConfigurationProperties(prefix = "spring.jooq")
@ConfigurationProperties("spring.jooq")
public class JooqProperties {
/**

View File

@ -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.
@ -62,7 +62,7 @@ import org.springframework.util.unit.DataSize;
* @author Scott Frederick
* @since 1.5.0
*/
@ConfigurationProperties(prefix = "spring.kafka")
@ConfigurationProperties("spring.kafka")
public class KafkaProperties {
/**

View File

@ -31,7 +31,7 @@ import org.springframework.util.ObjectUtils;
* @author Eddú Meléndez
* @since 1.5.0
*/
@ConfigurationProperties(prefix = "spring.ldap")
@ConfigurationProperties("spring.ldap")
public class LdapProperties {
private static final int DEFAULT_PORT = 389;

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2022 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.
@ -31,7 +31,7 @@ import org.springframework.util.StringUtils;
* @author Mathieu Ouellet
* @since 1.5.0
*/
@ConfigurationProperties(prefix = "spring.ldap.embedded")
@ConfigurationProperties("spring.ldap.embedded")
public class EmbeddedLdapProperties {
/**

View File

@ -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.
@ -31,7 +31,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
* @author Eddú Meléndez
* @since 1.2.0
*/
@ConfigurationProperties(prefix = "spring.mail")
@ConfigurationProperties("spring.mail")
public class MailProperties {
private static final Charset DEFAULT_CHARSET = StandardCharsets.UTF_8;

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 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.
@ -38,7 +38,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
* @author Safeer Ansari
* @since 1.0.0
*/
@ConfigurationProperties(prefix = "spring.data.mongodb")
@ConfigurationProperties("spring.data.mongodb")
public class MongoProperties {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2022 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.
@ -30,7 +30,7 @@ import org.springframework.util.MimeType;
* @author Dave Syer
* @since 1.2.2
*/
@ConfigurationProperties(prefix = "spring.mustache")
@ConfigurationProperties("spring.mustache")
public class MustacheProperties {
private static final MimeType DEFAULT_CONTENT_TYPE = MimeType.valueOf("text/html");

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2020 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.
@ -29,7 +29,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
* @author Stephane Nicoll
* @since 2.4.0
*/
@ConfigurationProperties(prefix = "spring.neo4j")
@ConfigurationProperties("spring.neo4j")
public class Neo4jProperties {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2022 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.
@ -26,7 +26,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
* @author Brian Clozel
* @since 2.5.0
*/
@ConfigurationProperties(prefix = "spring.netty")
@ConfigurationProperties("spring.netty")
public class NettyProperties {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2020 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.
@ -34,7 +34,7 @@ import org.springframework.orm.jpa.vendor.Database;
* @author Madhura Bhave
* @since 1.1.0
*/
@ConfigurationProperties(prefix = "spring.jpa")
@ConfigurationProperties("spring.jpa")
public class JpaProperties {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 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.
@ -34,7 +34,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
* @author Rodolpho S. Couto
* @since 2.3.0
*/
@ConfigurationProperties(prefix = "spring.r2dbc")
@ConfigurationProperties("spring.r2dbc")
public class R2dbcProperties {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 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.
@ -24,7 +24,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
* @author Brian Clozel
* @since 3.2.0
*/
@ConfigurationProperties(prefix = "spring.reactor")
@ConfigurationProperties("spring.reactor")
public class ReactorProperties {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 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.
@ -26,7 +26,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
* @author Moritz Halbritter
* @since 2.7.9
*/
@ConfigurationProperties(prefix = "spring.reactor.netty")
@ConfigurationProperties("spring.reactor.netty")
public class ReactorNettyProperties {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 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.
@ -36,7 +36,7 @@ import org.springframework.util.StringUtils;
* @author Madhura Bhave
* @since 1.0.0
*/
@ConfigurationProperties(prefix = "spring.security")
@ConfigurationProperties("spring.security")
public class SecurityProperties {
/**

View File

@ -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.
@ -34,7 +34,7 @@ import org.springframework.util.StringUtils;
* @author Moritz Halbritter
* @since 2.0.0
*/
@ConfigurationProperties(prefix = "spring.security.oauth2.client")
@ConfigurationProperties("spring.security.oauth2.client")
public class OAuth2ClientProperties implements InitializingBean {
/**

View File

@ -37,7 +37,7 @@ import org.springframework.util.StreamUtils;
* @author Yan Kardziyaka
* @since 2.1.0
*/
@ConfigurationProperties(prefix = "spring.security.oauth2.resourceserver")
@ConfigurationProperties("spring.security.oauth2.resourceserver")
public class OAuth2ResourceServerProperties {
private final Jwt jwt = new Jwt();

View File

@ -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.
@ -34,7 +34,7 @@ import org.springframework.util.StringUtils;
* @author Steve Riesenberg
* @since 3.1.0
*/
@ConfigurationProperties(prefix = "spring.security.oauth2.authorizationserver")
@ConfigurationProperties("spring.security.oauth2.authorizationserver")
public class OAuth2AuthorizationServerProperties implements InitializingBean {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 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.
@ -25,7 +25,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
* @author Andy Wilkinson
* @since 1.3.0
*/
@ConfigurationProperties(prefix = "spring.sendgrid")
@ConfigurationProperties("spring.sendgrid")
public class SendGridProperties {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 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.
@ -26,7 +26,7 @@ import org.springframework.session.SaveMode;
* @author Vedran Pavic
* @since 2.0.0
*/
@ConfigurationProperties(prefix = "spring.session.hazelcast")
@ConfigurationProperties("spring.session.hazelcast")
public class HazelcastSessionProperties {
/**

View File

@ -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.
@ -27,7 +27,7 @@ import org.springframework.session.SaveMode;
* @author Vedran Pavic
* @since 2.0.0
*/
@ConfigurationProperties(prefix = "spring.session.jdbc")
@ConfigurationProperties("spring.session.jdbc")
public class JdbcSessionProperties {
private static final String DEFAULT_SCHEMA_LOCATION = "classpath:org/springframework/"

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 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.
@ -24,7 +24,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
* @author Andy Wilkinson
* @since 2.0.0
*/
@ConfigurationProperties(prefix = "spring.session.mongodb")
@ConfigurationProperties("spring.session.mongodb")
public class MongoSessionProperties {
/**

View File

@ -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.
@ -26,7 +26,7 @@ import org.springframework.session.SaveMode;
* @author Vedran Pavic
* @since 2.0.0
*/
@ConfigurationProperties(prefix = "spring.session.redis")
@ConfigurationProperties("spring.session.redis")
public class RedisSessionProperties {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2022 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.
@ -36,7 +36,7 @@ import org.springframework.session.web.http.SessionRepositoryFilter;
* @author Vedran Pavic
* @since 1.4.0
*/
@ConfigurationProperties(prefix = "spring.session")
@ConfigurationProperties("spring.session")
public class SessionProperties {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 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.
@ -29,7 +29,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
* @author Moritz Halbritter
* @since 3.1.0
*/
@ConfigurationProperties(prefix = "spring.ssl")
@ConfigurationProperties("spring.ssl")
public class SslProperties {
/**

View File

@ -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.
@ -34,7 +34,7 @@ import org.springframework.util.unit.DataSize;
* @author Kazuki Shimizu
* @since 1.2.0
*/
@ConfigurationProperties(prefix = "spring.thymeleaf")
@ConfigurationProperties("spring.thymeleaf")
public class ThymeleafProperties {
private static final Charset DEFAULT_ENCODING = StandardCharsets.UTF_8;

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 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.
@ -31,7 +31,7 @@ import org.springframework.transaction.support.AbstractPlatformTransactionManage
* @author Phillip Webb
* @since 1.5.0
*/
@ConfigurationProperties(prefix = "spring.transaction")
@ConfigurationProperties("spring.transaction")
public class TransactionProperties implements TransactionManagerCustomizer<AbstractPlatformTransactionManager> {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 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.
@ -32,7 +32,7 @@ import org.springframework.util.unit.DataSize;
* @author Chris Bono
* @since 2.6.0
*/
@ConfigurationProperties(prefix = "spring.webflux.multipart")
@ConfigurationProperties("spring.webflux.multipart")
public class ReactiveMultipartProperties {
/**

View File

@ -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.
@ -26,7 +26,7 @@ import org.springframework.util.StringUtils;
* @author Vedran Pavic
* @since 2.0.0
*/
@ConfigurationProperties(prefix = "spring.webflux")
@ConfigurationProperties("spring.webflux")
public class WebFluxProperties {
/**

View File

@ -36,7 +36,7 @@ import org.springframework.validation.DefaultMessageCodesResolver;
* @author Vedran Pavic
* @since 2.0.0
*/
@ConfigurationProperties(prefix = "spring.mvc")
@ConfigurationProperties("spring.mvc")
public class WebMvcProperties {
/**

View File

@ -29,7 +29,7 @@ import org.springframework.util.Assert;
* @author Stephane Nicoll
* @since 1.4.0
*/
@ConfigurationProperties(prefix = "spring.webservices")
@ConfigurationProperties("spring.webservices")
public class WebServicesProperties {
/**

Some files were not shown because too many files have changed in this diff Show More