From cf8ac8860dbf34ba5adab9ba07065db7e76cbe76 Mon Sep 17 00:00:00 2001 From: Yanming Zhou Date: Wed, 22 Jan 2025 16:03:01 +0800 Subject: [PATCH] Remove unnecessary field initialization in @ConfigurationProperties class Signed-off-by: Yanming Zhou --- .../DataSourceHealthIndicatorProperties.java | 2 +- .../export/elastic/ElasticProperties.java | 2 +- .../stackdriver/StackdriverProperties.java | 2 +- .../tracing/TracingProperties.java | 2 +- .../autoconfigure/amqp/RabbitProperties.java | 2 +- .../context/MessageSourceProperties.java | 4 ++-- .../data/web/SpringDataWebProperties.java | 2 +- .../ElasticsearchProperties.java | 2 +- .../flyway/FlywayProperties.java | 2 +- .../graphql/GraphQlProperties.java | 4 ++-- .../autoconfigure/h2/H2ConsoleProperties.java | 6 +++--- .../integration/IntegrationProperties.java | 2 +- .../jackson/JacksonProperties.java | 2 +- .../boot/autoconfigure/jms/JmsProperties.java | 8 ++++---- .../jms/activemq/ActiveMQProperties.java | 2 +- .../boot/autoconfigure/jmx/JmxProperties.java | 4 ++-- .../autoconfigure/kafka/KafkaProperties.java | 10 +++++----- .../autoconfigure/ldap/LdapProperties.java | 4 ++-- .../autoconfigure/mail/MailProperties.java | 2 +- .../autoconfigure/mongo/MongoProperties.java | 2 +- .../mustache/MustacheProperties.java | 8 ++++---- .../autoconfigure/neo4j/Neo4jProperties.java | 6 +++--- .../autoconfigure/orm/jpa/JpaProperties.java | 4 ++-- .../pulsar/PulsarProperties.java | 6 +++--- .../quartz/QuartzProperties.java | 4 ++-- .../OAuth2AuthorizationServerProperties.java | 6 +++--- .../sql/init/SqlInitializationProperties.java | 2 +- ...bstractTemplateViewResolverProperties.java | 8 ++++---- .../thymeleaf/ThymeleafProperties.java | 2 +- .../autoconfigure/web/ServerProperties.java | 20 +++++++++---------- .../boot/autoconfigure/web/WebProperties.java | 14 ++++++------- .../web/reactive/WebFluxProperties.java | 2 +- .../web/servlet/MultipartProperties.java | 4 ++-- .../web/servlet/WebMvcProperties.java | 8 ++++---- .../boot/ApplicationProperties.java | 2 +- 35 files changed, 81 insertions(+), 81 deletions(-) diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/jdbc/DataSourceHealthIndicatorProperties.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/jdbc/DataSourceHealthIndicatorProperties.java index 5efe2583e7f0..97725f464410 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/jdbc/DataSourceHealthIndicatorProperties.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/jdbc/DataSourceHealthIndicatorProperties.java @@ -32,7 +32,7 @@ public class DataSourceHealthIndicatorProperties { * Whether to ignore AbstractRoutingDataSources when creating database health * indicators. */ - private boolean ignoreRoutingDataSources = false; + private boolean ignoreRoutingDataSources; public boolean isIgnoreRoutingDataSources() { return this.ignoreRoutingDataSources; diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/elastic/ElasticProperties.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/elastic/ElasticProperties.java index d26b143b0063..6f06ea8120f8 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/elastic/ElasticProperties.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/elastic/ElasticProperties.java @@ -83,7 +83,7 @@ public class ElasticProperties extends StepRegistryProperties { * Whether to enable _source in the default index template when auto-creating the * index. */ - private boolean enableSource = false; + private boolean enableSource; public String getHost() { return this.host; diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/stackdriver/StackdriverProperties.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/stackdriver/StackdriverProperties.java index 4557f3f5390c..34d06101cbc8 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/stackdriver/StackdriverProperties.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/stackdriver/StackdriverProperties.java @@ -52,7 +52,7 @@ public class StackdriverProperties extends StepRegistryProperties { * published as the GAUGE MetricKind. When true, counter metrics are published as the * CUMULATIVE MetricKind. */ - private boolean useSemanticMetricTypes = false; + private boolean useSemanticMetricTypes; /** * Prefix for metric type. Valid prefixes are described in the Google Cloud diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/tracing/TracingProperties.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/tracing/TracingProperties.java index 175ff03a8175..670d0f9b6e73 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/tracing/TracingProperties.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/tracing/TracingProperties.java @@ -281,7 +281,7 @@ public static class Brave { * between client and server spans. Requires B3 propagation and a compatible * backend. */ - private boolean spanJoiningSupported = false; + private boolean spanJoiningSupported; public boolean isSpanJoiningSupported() { return this.spanJoiningSupported; diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/amqp/RabbitProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/amqp/RabbitProperties.java index 1510e9adbed7..124359315b54 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/amqp/RabbitProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/amqp/RabbitProperties.java @@ -937,7 +937,7 @@ public static class DirectContainer extends AmqpContainer { * Whether to fail if the queues declared by the container are not available on * the broker. */ - private boolean missingQueuesFatal = false; + private boolean missingQueuesFatal; public Integer getConsumersPerQueue() { return this.consumersPerQueue; diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/context/MessageSourceProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/context/MessageSourceProperties.java index 0495e285fd4f..20268076eabb 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/context/MessageSourceProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/context/MessageSourceProperties.java @@ -74,13 +74,13 @@ public class MessageSourceProperties { * Whether to always apply the MessageFormat rules, parsing even messages without * arguments. */ - private boolean alwaysUseMessageFormat = false; + private boolean alwaysUseMessageFormat; /** * Whether to use the message code as the default message instead of throwing a * "NoSuchMessageException". Recommended during development only. */ - private boolean useCodeAsDefaultMessage = false; + private boolean useCodeAsDefaultMessage; public List getBasename() { return this.basename; diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/web/SpringDataWebProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/web/SpringDataWebProperties.java index fd59dc60748f..439d49bbc75e 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/web/SpringDataWebProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/web/SpringDataWebProperties.java @@ -60,7 +60,7 @@ public static class Pageable { * Whether to expose and assume 1-based page number indexes. Defaults to "false", * meaning a page number of 0 in the request equals the first page. */ - private boolean oneIndexedParameters = false; + private boolean oneIndexedParameters; /** * General prefix to be prepended to the page number and page size parameters. diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/elasticsearch/ElasticsearchProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/elasticsearch/ElasticsearchProperties.java index a0325023aeb3..cce5dce23e53 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/elasticsearch/ElasticsearchProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/elasticsearch/ElasticsearchProperties.java @@ -60,7 +60,7 @@ public class ElasticsearchProperties { /** * Whether to enable socket keep alive between client and Elasticsearch. */ - private boolean socketKeepAlive = false; + private boolean socketKeepAlive; /** * Prefix added to the path of every request sent to Elasticsearch. diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/flyway/FlywayProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/flyway/FlywayProperties.java index 60c812d9fa40..897b22c4d634 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/flyway/FlywayProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/flyway/FlywayProperties.java @@ -247,7 +247,7 @@ public class FlywayProperties { * Whether to validate migrations and callbacks whose scripts do not obey the correct * naming convention. */ - private boolean validateMigrationNaming = false; + private boolean validateMigrationNaming; /** * Whether to automatically call validate when performing a migration. diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/GraphQlProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/GraphQlProperties.java index eee2986ddcfc..55efa2e50cd2 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/GraphQlProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/GraphQlProperties.java @@ -180,7 +180,7 @@ public static class Printer { * Whether the endpoint that prints the schema is enabled. Schema is available * under spring.graphql.path + "/schema". */ - private boolean enabled = false; + private boolean enabled; public boolean isEnabled() { return this.enabled; @@ -204,7 +204,7 @@ public static class Graphiql { /** * Whether the default GraphiQL UI is enabled. */ - private boolean enabled = false; + private boolean enabled; public String getPath() { return this.path; diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/h2/H2ConsoleProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/h2/H2ConsoleProperties.java index 09dba6b7b56b..cf2149499c87 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/h2/H2ConsoleProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/h2/H2ConsoleProperties.java @@ -38,7 +38,7 @@ public class H2ConsoleProperties { /** * Whether to enable the console. */ - private boolean enabled = false; + private boolean enabled; private final Settings settings = new Settings(); @@ -70,12 +70,12 @@ public static class Settings { /** * Whether to enable trace output. */ - private boolean trace = false; + private boolean trace; /** * Whether to enable remote access. */ - private boolean webAllowOthers = false; + private boolean webAllowOthers; /** * Password to access preferences and tools of H2 Console. diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/integration/IntegrationProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/integration/IntegrationProperties.java index 5b7d2bbf764d..77768d62ac01 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/integration/IntegrationProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/integration/IntegrationProperties.java @@ -127,7 +127,7 @@ public static class Endpoint { * Whether to throw an exception when a reply is not expected anymore by a * gateway. */ - private boolean throwExceptionOnLateReply = false; + private boolean throwExceptionOnLateReply; /** * List of message header names that should not be populated into Message diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jackson/JacksonProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jackson/JacksonProperties.java index 46162768d4f5..4e9e885efec5 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jackson/JacksonProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jackson/JacksonProperties.java @@ -110,7 +110,7 @@ public class JacksonProperties { * Time zone used when formatting dates. For instance, "America/Los_Angeles" or * "GMT+10". */ - private TimeZone timeZone = null; + private TimeZone timeZone; /** * Locale used for formatting. diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jms/JmsProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jms/JmsProperties.java index 126ffd065f31..81d5e076a0da 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jms/JmsProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jms/JmsProperties.java @@ -37,7 +37,7 @@ public class JmsProperties { /** * Whether the default destination type is topic. */ - private boolean pubSubDomain = false; + private boolean pubSubDomain; /** * Connection factory JNDI name. When set, takes precedence to others connection @@ -48,7 +48,7 @@ public class JmsProperties { /** * Whether the subscription is durable. */ - private boolean subscriptionDurable = false; + private boolean subscriptionDurable; /** * Client id of the connection. @@ -115,7 +115,7 @@ public static class Cache { /** * Whether to cache message consumers. */ - private boolean consumers = false; + private boolean consumers; /** * Whether to cache message producers. @@ -423,7 +423,7 @@ public static class Session { /** * Whether to use transacted sessions. */ - private boolean transacted = false; + private boolean transacted; public AcknowledgeMode getAcknowledgeMode() { return this.acknowledgeMode; diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jms/activemq/ActiveMQProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jms/activemq/ActiveMQProperties.java index dc4bb98a2b61..071c21c09b6b 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jms/activemq/ActiveMQProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jms/activemq/ActiveMQProperties.java @@ -67,7 +67,7 @@ public class ActiveMQProperties { * Whether to stop message delivery before re-delivering messages from a rolled back * transaction. This implies that message order is not preserved when this is enabled. */ - private boolean nonBlockingRedelivery = false; + private boolean nonBlockingRedelivery; /** * Time to wait on message sends for a response. Set it to 0 to wait forever. diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jmx/JmxProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jmx/JmxProperties.java index 57b10a74ff5b..d225816e3de4 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jmx/JmxProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jmx/JmxProperties.java @@ -31,12 +31,12 @@ public class JmxProperties { /** * Expose Spring's management beans to the JMX domain. */ - private boolean enabled = false; + private boolean enabled; /** * Whether unique runtime object names should be ensured. */ - private boolean uniqueNames = false; + private boolean uniqueNames; /** * MBeanServer bean name. diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/kafka/KafkaProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/kafka/KafkaProperties.java index 90133fab101f..32466930ca1f 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/kafka/KafkaProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/kafka/KafkaProperties.java @@ -1057,13 +1057,13 @@ public enum Type { * Whether the container should fail to start if at least one of the configured * topics are not present on the broker. */ - private boolean missingTopicsFatal = false; + private boolean missingTopicsFatal; /** * Whether the container stops after the current record is processed or after all * the records from the previous poll are processed. */ - private boolean immediateStop = false; + private boolean immediateStop; /** * Whether to auto start the container. @@ -1669,7 +1669,7 @@ public static class Backoff { /** * Whether to have the backoff delays. */ - private boolean random = false; + private boolean random; public Duration getDelay() { return this.delay; @@ -1714,12 +1714,12 @@ public static class Cleanup { /** * Cleanup the application’s local state directory on startup. */ - private boolean onStartup = false; + private boolean onStartup; /** * Cleanup the application’s local state directory on shutdown. */ - private boolean onShutdown = false; + private boolean onShutdown; public boolean isOnStartup() { return this.onStartup; diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/ldap/LdapProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/ldap/LdapProperties.java index dfbeb72350fc..5ce4ec1383db 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/ldap/LdapProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/ldap/LdapProperties.java @@ -142,13 +142,13 @@ public static class Template { * Whether PartialResultException should be ignored in searches through the * LdapTemplate. */ - private boolean ignorePartialResultException = false; + private boolean ignorePartialResultException; /** * Whether NameNotFoundException should be ignored in searches through the * LdapTemplate. */ - private boolean ignoreNameNotFoundException = false; + private boolean ignoreNameNotFoundException; /** * Whether SizeLimitExceededException should be ignored in searches through the diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mail/MailProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mail/MailProperties.java index 2b2e182998a2..24f8b470b11f 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mail/MailProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mail/MailProperties.java @@ -151,7 +151,7 @@ public static class Ssl { * Whether to enable SSL support. If enabled, 'mail.(protocol).ssl.enable' * property is set to 'true'. */ - private boolean enabled = false; + private boolean enabled; /** * SSL bundle name. If set, 'mail.(protocol).ssl.socketFactory' property is set to diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mongo/MongoProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mongo/MongoProperties.java index 768d52c5b740..20f50f061ef4 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mongo/MongoProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mongo/MongoProperties.java @@ -59,7 +59,7 @@ public class MongoProperties { /** * Mongo server port. Cannot be set with URI. */ - private Integer port = null; + private Integer port; /** * Additional server hosts. Cannot be set with URI or if 'host' is not specified. diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mustache/MustacheProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mustache/MustacheProperties.java index 0298dee69c4d..2b0ab58c2473 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mustache/MustacheProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mustache/MustacheProperties.java @@ -154,13 +154,13 @@ public static class Servlet { * Whether HttpServletRequest attributes are allowed to override (hide) controller * generated model attributes of the same name. */ - private boolean allowRequestOverride = false; + private boolean allowRequestOverride; /** * Whether HttpSession attributes are allowed to override (hide) controller * generated model attributes of the same name. */ - private boolean allowSessionOverride = false; + private boolean allowSessionOverride; /** * Whether to enable template caching. @@ -176,13 +176,13 @@ public static class Servlet { * Whether all request attributes should be added to the model prior to merging * with the template. */ - private boolean exposeRequestAttributes = false; + private boolean exposeRequestAttributes; /** * Whether all HttpSession attributes should be added to the model prior to * merging with the template. */ - private boolean exposeSessionAttributes = false; + private boolean exposeSessionAttributes; /** * Whether to expose a RequestContext for use by Spring's macro library, under the diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/neo4j/Neo4jProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/neo4j/Neo4jProperties.java index 5b856a52e975..e82f41f31b84 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/neo4j/Neo4jProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/neo4j/Neo4jProperties.java @@ -151,12 +151,12 @@ public static class Pool { /** * Whether to enable metrics. */ - private boolean metricsEnabled = false; + private boolean metricsEnabled; /** * Whether to log leaked sessions. */ - private boolean logLeakedSessions = false; + private boolean logLeakedSessions; /** * Maximum amount of connections in the connection pool towards a single database. @@ -236,7 +236,7 @@ public static class Security { /** * Whether the driver should use encrypted traffic. */ - private boolean encrypted = false; + private boolean encrypted; /** * Trust strategy to use. diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa/JpaProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa/JpaProperties.java index 9a208af28e7e..c83026bc8421 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa/JpaProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa/JpaProperties.java @@ -62,12 +62,12 @@ public class JpaProperties { /** * Whether to initialize the schema on startup. */ - private boolean generateDdl = false; + private boolean generateDdl; /** * Whether to enable logging of SQL statements. */ - private boolean showSql = false; + private boolean showSql; /** * Register OpenEntityManagerInViewInterceptor. Binds a JPA EntityManager to the diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/pulsar/PulsarProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/pulsar/PulsarProperties.java index 5ab34e4acfa4..88b4f1d9dccd 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/pulsar/PulsarProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/pulsar/PulsarProperties.java @@ -369,7 +369,7 @@ public static class Function { * Whether to throw an exception if any failure is encountered during server * shutdown while enforcing stop policy on functions. */ - private boolean propagateStopFailures = false; + private boolean propagateStopFailures; public boolean isFailFast() { return this.failFast; @@ -594,7 +594,7 @@ public static class Consumer { * Whether to read messages from the compacted topic rather than the full message * backlog. */ - private boolean readCompacted = false; + private boolean readCompacted; /** * Dead letter policy to use. @@ -610,7 +610,7 @@ public static class Consumer { /** * Whether to auto retry messages. */ - private boolean retryEnable = false; + private boolean retryEnable; public String getName() { return this.name; diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/quartz/QuartzProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/quartz/QuartzProperties.java index cc2ebaf5e56b..2aef10f29b46 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/quartz/QuartzProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/quartz/QuartzProperties.java @@ -61,12 +61,12 @@ public class QuartzProperties { /** * Whether to wait for running jobs to complete on shutdown. */ - private boolean waitForJobsToCompleteOnShutdown = false; + private boolean waitForJobsToCompleteOnShutdown; /** * Whether configured jobs should overwrite existing job definitions. */ - private boolean overwriteExistingJobs = false; + private boolean overwriteExistingJobs; /** * Additional Quartz Scheduler properties. diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/server/servlet/OAuth2AuthorizationServerProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/server/servlet/OAuth2AuthorizationServerProperties.java index fd7ceba3c338..fee5f4644925 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/server/servlet/OAuth2AuthorizationServerProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/server/servlet/OAuth2AuthorizationServerProperties.java @@ -47,7 +47,7 @@ public class OAuth2AuthorizationServerProperties implements InitializingBean { * the issuer identifier enables supporting multiple issuers per host in a * multi-tenant hosting configuration. */ - private boolean multipleIssuersAllowed = false; + private boolean multipleIssuersAllowed; /** * Registered clients of the Authorization Server. @@ -273,12 +273,12 @@ public static class Client { * Whether the client is required to provide a proof key challenge and verifier * when performing the Authorization Code Grant flow. */ - private boolean requireProofKey = false; + private boolean requireProofKey; /** * Whether authorization consent is required when the client requests access. */ - private boolean requireAuthorizationConsent = false; + private boolean requireAuthorizationConsent; /** * URL for the client's JSON Web Key Set. diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/sql/init/SqlInitializationProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/sql/init/SqlInitializationProperties.java index 6d11f61816da..907123fe312c 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/sql/init/SqlInitializationProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/sql/init/SqlInitializationProperties.java @@ -63,7 +63,7 @@ public class SqlInitializationProperties { /** * Whether initialization should continue when an error occurs. */ - private boolean continueOnError = false; + private boolean continueOnError; /** * Statement separator in the schema and data scripts. diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/template/AbstractTemplateViewResolverProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/template/AbstractTemplateViewResolverProperties.java index b9422a539d44..43010665ca0d 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/template/AbstractTemplateViewResolverProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/template/AbstractTemplateViewResolverProperties.java @@ -49,19 +49,19 @@ public abstract class AbstractTemplateViewResolverProperties extends AbstractVie * Whether all request attributes should be added to the model prior to merging with * the template. */ - private boolean exposeRequestAttributes = false; + private boolean exposeRequestAttributes; /** * Whether all HttpSession attributes should be added to the model prior to merging * with the template. */ - private boolean exposeSessionAttributes = false; + private boolean exposeSessionAttributes; /** * Whether HttpServletRequest attributes are allowed to override (hide) controller * generated model attributes of the same name. */ - private boolean allowRequestOverride = false; + private boolean allowRequestOverride; /** * Whether to expose a RequestContext for use by Spring's macro library, under the @@ -73,7 +73,7 @@ public abstract class AbstractTemplateViewResolverProperties extends AbstractVie * Whether HttpSession attributes are allowed to override (hide) controller generated * model attributes of the same name. */ - private boolean allowSessionOverride = false; + private boolean allowSessionOverride; protected AbstractTemplateViewResolverProperties(String defaultPrefix, String defaultSuffix) { this.prefix = defaultPrefix; diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/thymeleaf/ThymeleafProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/thymeleaf/ThymeleafProperties.java index b1d32a5a2c25..a4ac77236953 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/thymeleaf/ThymeleafProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/thymeleaf/ThymeleafProperties.java @@ -104,7 +104,7 @@ public class ThymeleafProperties { * Whether hidden form inputs acting as markers for checkboxes should be rendered * before the checkbox element itself. */ - private boolean renderHiddenMarkersBeforeCheckboxes = false; + private boolean renderHiddenMarkersBeforeCheckboxes; /** * Whether to enable Thymeleaf view resolution for Web frameworks. diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java index 523625d122fc..9566cdc2021e 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java @@ -264,7 +264,7 @@ public static class Servlet { /** * Whether to register the default Servlet with the container. */ - private boolean registerDefaultServlet = false; + private boolean registerDefaultServlet; @NestedConfigurationProperty private final Encoding encoding = new Encoding(); @@ -691,7 +691,7 @@ public static class Accesslog { /** * Enable access log. */ - private boolean enabled = false; + private boolean enabled; /** * Whether logging of the request will only be enabled if @@ -742,7 +742,7 @@ public static class Accesslog { * Whether to check for log file existence so it can be recreated if an * external process has renamed it. */ - private boolean checkExists = false; + private boolean checkExists; /** * Whether to enable access log rotation. @@ -753,7 +753,7 @@ public static class Accesslog { * Whether to defer inclusion of the date stamp in the file name until rotate * time. */ - private boolean renameOnRotate = false; + private boolean renameOnRotate; /** * Number of days to retain the access log files before they are removed. @@ -768,13 +768,13 @@ public static class Accesslog { /** * Whether to use IPv6 canonical representation format as defined by RFC 5952. */ - private boolean ipv6Canonical = false; + private boolean ipv6Canonical; /** * Set request attributes for the IP address, Hostname, protocol, and port * used for the request. */ - private boolean requestAttributesEnabled = false; + private boolean requestAttributesEnabled; /** * Whether to buffer output such that it is flushed only periodically. @@ -1226,7 +1226,7 @@ public static class Accesslog { /** * Enable access log. */ - private boolean enabled = false; + private boolean enabled; /** * Log format. @@ -1593,7 +1593,7 @@ public static class Undertow { * application that requires it. Has no effect when server.undertow.decode-slash * is set. */ - private boolean allowEncodedSlash = false; + private boolean allowEncodedSlash; /** * Whether encoded slash characters (%2F) should be decoded. Decoding can cause @@ -1629,7 +1629,7 @@ public static class Undertow { /** * Whether to preserve the path of a request when it is forwarded. */ - private boolean preservePathOnForward = false; + private boolean preservePathOnForward; private final Accesslog accesslog = new Accesslog(); @@ -1775,7 +1775,7 @@ public static class Accesslog { /** * Whether to enable the access log. */ - private boolean enabled = false; + private boolean enabled; /** * Format pattern for access logs. diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/WebProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/WebProperties.java index 4b834cd55c85..83d5c1f3d9fc 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/WebProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/WebProperties.java @@ -99,7 +99,7 @@ public static class Resources { */ private boolean addMappings = true; - private boolean customized = false; + private boolean customized; private final Chain chain = new Chain(); @@ -149,7 +149,7 @@ public boolean hasBeenCustomized() { */ public static class Chain { - boolean customized = false; + private boolean customized; /** * Whether to enable the Spring Resource Handling chain. By default, disabled @@ -167,7 +167,7 @@ public static class Chain { * brotli). Checks for a resource name with the '.gz' or '.br' file * extensions. */ - private boolean compressed = false; + private boolean compressed; private final Strategy strategy = new Strategy(); @@ -243,7 +243,7 @@ private boolean hasBeenCustomized() { */ public static class Content { - private boolean customized = false; + private boolean customized; /** * Whether to enable the content Version Strategy. @@ -284,7 +284,7 @@ private boolean hasBeenCustomized() { */ public static class Fixed { - private boolean customized = false; + private boolean customized; /** * Whether to enable the fixed Version Strategy. @@ -343,7 +343,7 @@ private boolean hasBeenCustomized() { */ public static class Cache { - private boolean customized = false; + private boolean customized; /** * Cache period for the resources served by the resource handler. If a @@ -395,7 +395,7 @@ private boolean hasBeenCustomized() { */ public static class Cachecontrol { - private boolean customized = false; + private boolean customized; /** * Maximum time the response should be cached, in seconds if no duration diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/WebFluxProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/WebFluxProperties.java index 618b5164f919..07e40f47491d 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/WebFluxProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/WebFluxProperties.java @@ -147,7 +147,7 @@ public static class Problemdetails { /** * Whether RFC 9457 Problem Details support should be enabled. */ - private boolean enabled = false; + private boolean enabled; public boolean isEnabled() { return this.enabled; diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/MultipartProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/MultipartProperties.java index 6e38a93927dd..d78bf9578c7a 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/MultipartProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/MultipartProperties.java @@ -78,13 +78,13 @@ public class MultipartProperties { * Whether to resolve the multipart request lazily at the time of file or parameter * access. */ - private boolean resolveLazily = false; + private boolean resolveLazily; /** * Whether to resolve the multipart request strictly complying with the Servlet * specification, only to be used for "multipart/form-data" requests. */ - private boolean strictServletCompliance = false; + private boolean strictServletCompliance; public boolean getEnabled() { return this.enabled; diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/WebMvcProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/WebMvcProperties.java index f3a66982991e..f8d8f18f9b03 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/WebMvcProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/WebMvcProperties.java @@ -49,7 +49,7 @@ public class WebMvcProperties { /** * Whether to dispatch TRACE requests to the FrameworkServlet doService method. */ - private boolean dispatchTraceRequest = false; + private boolean dispatchTraceRequest; /** * Whether to dispatch OPTIONS requests to the FrameworkServlet doService method. @@ -71,7 +71,7 @@ public class WebMvcProperties { * Whether to enable warn logging of exceptions resolved by a * "HandlerExceptionResolver", except for "DefaultHandlerExceptionResolver". */ - private boolean logResolvedException = false; + private boolean logResolvedException; /** * Path pattern used for static resources. @@ -304,7 +304,7 @@ public static class Contentnegotiation { * Whether a request parameter ("format" by default) should be used to determine * the requested media type. */ - private boolean favorParameter = false; + private boolean favorParameter; /** * Map file extensions to media types for content negotiation. For instance, yml @@ -430,7 +430,7 @@ public static class Problemdetails { /** * Whether RFC 9457 Problem Details support should be enabled. */ - private boolean enabled = false; + private boolean enabled; public boolean isEnabled() { return this.enabled; diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/ApplicationProperties.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/ApplicationProperties.java index 34848c776966..3500d0cd60a8 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/ApplicationProperties.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/ApplicationProperties.java @@ -56,7 +56,7 @@ class ApplicationProperties { /** * Whether initialization should be performed lazily. */ - private boolean lazyInitialization = false; + private boolean lazyInitialization; /** * Whether to log information about the application when it starts.