Skip to content

Commit 76caa3c

Browse files
wilkinsonaphilwebb
authored andcommitted
Fix problems found by improved auto-configuration checks
1 parent c688ae3 commit 76caa3c

File tree

5 files changed

+37
-41
lines changed

5 files changed

+37
-41
lines changed

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/endpoint/jackson/JacksonEndpointAutoConfiguration.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,12 @@
2121
import com.fasterxml.jackson.databind.SerializationFeature;
2222

2323
import org.springframework.boot.actuate.endpoint.jackson.EndpointObjectMapper;
24-
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
24+
import org.springframework.boot.autoconfigure.AutoConfiguration;
2525
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
2626
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
2727
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
2828
import org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration;
2929
import org.springframework.context.annotation.Bean;
30-
import org.springframework.context.annotation.Configuration;
3130
import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder;
3231

3332
/**
@@ -36,8 +35,7 @@
3635
* @author Phillip Webb
3736
* @since 3.0.0
3837
*/
39-
@Configuration(proxyBeanMethods = false)
40-
@AutoConfigureAfter(JacksonAutoConfiguration.class)
38+
@AutoConfiguration(after = JacksonAutoConfiguration.class)
4139
public class JacksonEndpointAutoConfiguration {
4240

4341
@Bean

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/orm/jpa/HibernateMetricsAutoConfiguration.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,11 @@
2828
import org.springframework.beans.factory.SmartInitializingSingleton;
2929
import org.springframework.boot.actuate.autoconfigure.metrics.MetricsAutoConfiguration;
3030
import org.springframework.boot.actuate.autoconfigure.metrics.export.simple.SimpleMetricsExportAutoConfiguration;
31-
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
31+
import org.springframework.boot.autoconfigure.AutoConfiguration;
3232
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
3333
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
3434
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
3535
import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
36-
import org.springframework.context.annotation.Configuration;
3736
import org.springframework.util.StringUtils;
3837

3938
/**
@@ -44,8 +43,7 @@
4443
* @author Stephane Nicoll
4544
* @since 2.1.0
4645
*/
47-
@Configuration(proxyBeanMethods = false)
48-
@AutoConfigureAfter({ MetricsAutoConfiguration.class, HibernateJpaAutoConfiguration.class,
46+
@AutoConfiguration(after = { MetricsAutoConfiguration.class, HibernateJpaAutoConfiguration.class,
4947
SimpleMetricsExportAutoConfiguration.class })
5048
@ConditionalOnClass({ EntityManagerFactory.class, SessionFactory.class, HibernateMetrics.class, MeterRegistry.class })
5149
@ConditionalOnBean({ EntityManagerFactory.class, MeterRegistry.class })

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,18 @@ org.springframework.boot.actuate.autoconfigure.beans.BeansEndpointAutoConfigurat
77
org.springframework.boot.actuate.autoconfigure.cache.CachesEndpointAutoConfiguration
88
org.springframework.boot.actuate.autoconfigure.cassandra.CassandraHealthContributorAutoConfiguration
99
org.springframework.boot.actuate.autoconfigure.cassandra.CassandraReactiveHealthContributorAutoConfiguration
10-
org.springframework.boot.actuate.autoconfigure.cloudfoundry.servlet.CloudFoundryActuatorAutoConfiguration
1110
org.springframework.boot.actuate.autoconfigure.cloudfoundry.reactive.ReactiveCloudFoundryActuatorAutoConfiguration
11+
org.springframework.boot.actuate.autoconfigure.cloudfoundry.servlet.CloudFoundryActuatorAutoConfiguration
1212
org.springframework.boot.actuate.autoconfigure.condition.ConditionsReportEndpointAutoConfiguration
13-
org.springframework.boot.actuate.autoconfigure.context.properties.ConfigurationPropertiesReportEndpointAutoConfiguration
1413
org.springframework.boot.actuate.autoconfigure.context.ShutdownEndpointAutoConfiguration
14+
org.springframework.boot.actuate.autoconfigure.context.properties.ConfigurationPropertiesReportEndpointAutoConfiguration
1515
org.springframework.boot.actuate.autoconfigure.couchbase.CouchbaseHealthContributorAutoConfiguration
1616
org.springframework.boot.actuate.autoconfigure.couchbase.CouchbaseReactiveHealthContributorAutoConfiguration
1717
org.springframework.boot.actuate.autoconfigure.data.elasticsearch.ElasticsearchReactiveHealthContributorAutoConfiguration
18+
org.springframework.boot.actuate.autoconfigure.data.mongo.MongoHealthContributorAutoConfiguration
19+
org.springframework.boot.actuate.autoconfigure.data.mongo.MongoReactiveHealthContributorAutoConfiguration
20+
org.springframework.boot.actuate.autoconfigure.data.redis.RedisHealthContributorAutoConfiguration
21+
org.springframework.boot.actuate.autoconfigure.data.redis.RedisReactiveHealthContributorAutoConfiguration
1822
org.springframework.boot.actuate.autoconfigure.elasticsearch.ElasticsearchRestHealthContributorAutoConfiguration
1923
org.springframework.boot.actuate.autoconfigure.endpoint.EndpointAutoConfiguration
2024
org.springframework.boot.actuate.autoconfigure.endpoint.jackson.JacksonEndpointAutoConfiguration
@@ -70,8 +74,6 @@ org.springframework.boot.actuate.autoconfigure.metrics.export.simple.SimpleMetri
7074
org.springframework.boot.actuate.autoconfigure.metrics.export.stackdriver.StackdriverMetricsExportAutoConfiguration
7175
org.springframework.boot.actuate.autoconfigure.metrics.export.statsd.StatsdMetricsExportAutoConfiguration
7276
org.springframework.boot.actuate.autoconfigure.metrics.export.wavefront.WavefrontMetricsExportAutoConfiguration
73-
org.springframework.boot.actuate.autoconfigure.observation.batch.BatchObservationAutoConfiguration
74-
org.springframework.boot.actuate.autoconfigure.observation.graphql.GraphQlObservationAutoConfiguration
7577
org.springframework.boot.actuate.autoconfigure.metrics.integration.IntegrationMetricsAutoConfiguration
7678
org.springframework.boot.actuate.autoconfigure.metrics.jdbc.DataSourcePoolMetricsAutoConfiguration
7779
org.springframework.boot.actuate.autoconfigure.metrics.jersey.JerseyServerMetricsAutoConfiguration
@@ -81,21 +83,19 @@ org.springframework.boot.actuate.autoconfigure.metrics.r2dbc.ConnectionPoolMetri
8183
org.springframework.boot.actuate.autoconfigure.metrics.redis.LettuceMetricsAutoConfiguration
8284
org.springframework.boot.actuate.autoconfigure.metrics.startup.StartupTimeMetricsListenerAutoConfiguration
8385
org.springframework.boot.actuate.autoconfigure.metrics.task.TaskExecutorMetricsAutoConfiguration
84-
org.springframework.boot.actuate.autoconfigure.observation.web.client.HttpClientObservationsAutoConfiguration
8586
org.springframework.boot.actuate.autoconfigure.metrics.web.jetty.JettyMetricsAutoConfiguration
86-
org.springframework.boot.actuate.autoconfigure.observation.web.reactive.WebFluxObservationAutoConfiguration
8787
org.springframework.boot.actuate.autoconfigure.metrics.web.tomcat.TomcatMetricsAutoConfiguration
88-
org.springframework.boot.actuate.autoconfigure.data.mongo.MongoHealthContributorAutoConfiguration
89-
org.springframework.boot.actuate.autoconfigure.data.mongo.MongoReactiveHealthContributorAutoConfiguration
9088
org.springframework.boot.actuate.autoconfigure.neo4j.Neo4jHealthContributorAutoConfiguration
9189
org.springframework.boot.actuate.autoconfigure.observation.ObservationAutoConfiguration
90+
org.springframework.boot.actuate.autoconfigure.observation.batch.BatchObservationAutoConfiguration
91+
org.springframework.boot.actuate.autoconfigure.observation.graphql.GraphQlObservationAutoConfiguration
92+
org.springframework.boot.actuate.autoconfigure.observation.web.client.HttpClientObservationsAutoConfiguration
93+
org.springframework.boot.actuate.autoconfigure.observation.web.reactive.WebFluxObservationAutoConfiguration
9294
org.springframework.boot.actuate.autoconfigure.observation.web.servlet.WebMvcObservationAutoConfiguration
9395
org.springframework.boot.actuate.autoconfigure.opentelemetry.OpenTelemetryAutoConfiguration
9496
org.springframework.boot.actuate.autoconfigure.quartz.QuartzEndpointAutoConfiguration
9597
org.springframework.boot.actuate.autoconfigure.r2dbc.ConnectionFactoryHealthContributorAutoConfiguration
9698
org.springframework.boot.actuate.autoconfigure.r2dbc.R2dbcObservationAutoConfiguration
97-
org.springframework.boot.actuate.autoconfigure.data.redis.RedisHealthContributorAutoConfiguration
98-
org.springframework.boot.actuate.autoconfigure.data.redis.RedisReactiveHealthContributorAutoConfiguration
9999
org.springframework.boot.actuate.autoconfigure.sbom.SbomEndpointAutoConfiguration
100100
org.springframework.boot.actuate.autoconfigure.scheduling.ScheduledTasksEndpointAutoConfiguration
101101
org.springframework.boot.actuate.autoconfigure.scheduling.ScheduledTasksObservabilityAutoConfiguration

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/reactor/ReactorAutoConfiguration.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,18 @@
1818

1919
import reactor.core.publisher.Hooks;
2020

21+
import org.springframework.boot.autoconfigure.AutoConfiguration;
2122
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
2223
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
2324
import org.springframework.boot.context.properties.EnableConfigurationProperties;
24-
import org.springframework.context.annotation.Configuration;
2525

2626
/**
2727
* {@link EnableAutoConfiguration Auto-configuration} for Reactor.
2828
*
2929
* @author Brian Clozel
3030
* @since 3.2.0
3131
*/
32-
@Configuration(proxyBeanMethods = false)
32+
@AutoConfiguration
3333
@ConditionalOnClass(Hooks.class)
3434
@EnableConfigurationProperties(ReactorProperties.class)
3535
public class ReactorAutoConfiguration {

spring-boot-project/spring-boot-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
org.springframework.boot.autoconfigure.admin.SpringApplicationAdminJmxAutoConfiguration
2-
org.springframework.boot.autoconfigure.aop.AopAutoConfiguration
32
org.springframework.boot.autoconfigure.amqp.RabbitAutoConfiguration
3+
org.springframework.boot.autoconfigure.aop.AopAutoConfiguration
4+
org.springframework.boot.autoconfigure.availability.ApplicationAvailabilityAutoConfiguration
45
org.springframework.boot.autoconfigure.batch.BatchAutoConfiguration
56
org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration
67
org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration
@@ -45,10 +46,10 @@ org.springframework.boot.autoconfigure.elasticsearch.ReactiveElasticsearchClient
4546
org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration
4647
org.springframework.boot.autoconfigure.freemarker.FreeMarkerAutoConfiguration
4748
org.springframework.boot.autoconfigure.graphql.GraphQlAutoConfiguration
48-
org.springframework.boot.autoconfigure.graphql.data.GraphQlReactiveQueryByExampleAutoConfiguration
49-
org.springframework.boot.autoconfigure.graphql.data.GraphQlReactiveQuerydslAutoConfiguration
5049
org.springframework.boot.autoconfigure.graphql.data.GraphQlQueryByExampleAutoConfiguration
5150
org.springframework.boot.autoconfigure.graphql.data.GraphQlQuerydslAutoConfiguration
51+
org.springframework.boot.autoconfigure.graphql.data.GraphQlReactiveQueryByExampleAutoConfiguration
52+
org.springframework.boot.autoconfigure.graphql.data.GraphQlReactiveQuerydslAutoConfiguration
5253
org.springframework.boot.autoconfigure.graphql.reactive.GraphQlWebFluxAutoConfiguration
5354
org.springframework.boot.autoconfigure.graphql.rsocket.GraphQlRSocketAutoConfiguration
5455
org.springframework.boot.autoconfigure.graphql.rsocket.RSocketGraphQlClientAutoConfiguration
@@ -68,23 +69,22 @@ org.springframework.boot.autoconfigure.info.ProjectInfoAutoConfiguration
6869
org.springframework.boot.autoconfigure.integration.IntegrationAutoConfiguration
6970
org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration
7071
org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
72+
org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration
7173
org.springframework.boot.autoconfigure.jdbc.JdbcClientAutoConfiguration
7274
org.springframework.boot.autoconfigure.jdbc.JdbcTemplateAutoConfiguration
7375
org.springframework.boot.autoconfigure.jdbc.JndiDataSourceAutoConfiguration
7476
org.springframework.boot.autoconfigure.jdbc.XADataSourceAutoConfiguration
75-
org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration
7677
org.springframework.boot.autoconfigure.jersey.JerseyAutoConfiguration
7778
org.springframework.boot.autoconfigure.jms.JmsAutoConfiguration
78-
org.springframework.boot.autoconfigure.jmx.JmxAutoConfiguration
7979
org.springframework.boot.autoconfigure.jms.JndiConnectionFactoryAutoConfiguration
8080
org.springframework.boot.autoconfigure.jms.activemq.ActiveMQAutoConfiguration
8181
org.springframework.boot.autoconfigure.jms.artemis.ArtemisAutoConfiguration
82+
org.springframework.boot.autoconfigure.jmx.JmxAutoConfiguration
8283
org.springframework.boot.autoconfigure.jooq.JooqAutoConfiguration
8384
org.springframework.boot.autoconfigure.jsonb.JsonbAutoConfiguration
8485
org.springframework.boot.autoconfigure.kafka.KafkaAutoConfiguration
85-
org.springframework.boot.autoconfigure.availability.ApplicationAvailabilityAutoConfiguration
86-
org.springframework.boot.autoconfigure.ldap.embedded.EmbeddedLdapAutoConfiguration
8786
org.springframework.boot.autoconfigure.ldap.LdapAutoConfiguration
87+
org.springframework.boot.autoconfigure.ldap.embedded.EmbeddedLdapAutoConfiguration
8888
org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration
8989
org.springframework.boot.autoconfigure.mail.MailSenderAutoConfiguration
9090
org.springframework.boot.autoconfigure.mail.MailSenderValidatorAutoConfiguration
@@ -104,21 +104,21 @@ org.springframework.boot.autoconfigure.rsocket.RSocketMessagingAutoConfiguration
104104
org.springframework.boot.autoconfigure.rsocket.RSocketRequesterAutoConfiguration
105105
org.springframework.boot.autoconfigure.rsocket.RSocketServerAutoConfiguration
106106
org.springframework.boot.autoconfigure.rsocket.RSocketStrategiesAutoConfiguration
107-
org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration
108-
org.springframework.boot.autoconfigure.security.servlet.UserDetailsServiceAutoConfiguration
109-
org.springframework.boot.autoconfigure.security.servlet.SecurityFilterAutoConfiguration
107+
org.springframework.boot.autoconfigure.security.oauth2.client.reactive.ReactiveOAuth2ClientAutoConfiguration
108+
org.springframework.boot.autoconfigure.security.oauth2.client.servlet.OAuth2ClientAutoConfiguration
109+
org.springframework.boot.autoconfigure.security.oauth2.resource.reactive.ReactiveOAuth2ResourceServerAutoConfiguration
110+
org.springframework.boot.autoconfigure.security.oauth2.resource.servlet.OAuth2ResourceServerAutoConfiguration
111+
org.springframework.boot.autoconfigure.security.oauth2.server.servlet.OAuth2AuthorizationServerAutoConfiguration
112+
org.springframework.boot.autoconfigure.security.oauth2.server.servlet.OAuth2AuthorizationServerJwtAutoConfiguration
110113
org.springframework.boot.autoconfigure.security.reactive.ReactiveSecurityAutoConfiguration
111114
org.springframework.boot.autoconfigure.security.reactive.ReactiveUserDetailsServiceAutoConfiguration
112115
org.springframework.boot.autoconfigure.security.rsocket.RSocketSecurityAutoConfiguration
113116
org.springframework.boot.autoconfigure.security.saml2.Saml2RelyingPartyAutoConfiguration
117+
org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration
118+
org.springframework.boot.autoconfigure.security.servlet.SecurityFilterAutoConfiguration
119+
org.springframework.boot.autoconfigure.security.servlet.UserDetailsServiceAutoConfiguration
114120
org.springframework.boot.autoconfigure.sendgrid.SendGridAutoConfiguration
115121
org.springframework.boot.autoconfigure.session.SessionAutoConfiguration
116-
org.springframework.boot.autoconfigure.security.oauth2.client.servlet.OAuth2ClientAutoConfiguration
117-
org.springframework.boot.autoconfigure.security.oauth2.client.reactive.ReactiveOAuth2ClientAutoConfiguration
118-
org.springframework.boot.autoconfigure.security.oauth2.resource.servlet.OAuth2ResourceServerAutoConfiguration
119-
org.springframework.boot.autoconfigure.security.oauth2.resource.reactive.ReactiveOAuth2ResourceServerAutoConfiguration
120-
org.springframework.boot.autoconfigure.security.oauth2.server.servlet.OAuth2AuthorizationServerAutoConfiguration
121-
org.springframework.boot.autoconfigure.security.oauth2.server.servlet.OAuth2AuthorizationServerJwtAutoConfiguration
122122
org.springframework.boot.autoconfigure.sql.init.SqlInitializationAutoConfiguration
123123
org.springframework.boot.autoconfigure.ssl.SslAutoConfiguration
124124
org.springframework.boot.autoconfigure.task.TaskExecutionAutoConfiguration
@@ -140,13 +140,13 @@ org.springframework.boot.autoconfigure.web.reactive.error.ErrorWebFluxAutoConfig
140140
org.springframework.boot.autoconfigure.web.reactive.function.client.ClientHttpConnectorAutoConfiguration
141141
org.springframework.boot.autoconfigure.web.reactive.function.client.WebClientAutoConfiguration
142142
org.springframework.boot.autoconfigure.web.servlet.DispatcherServletAutoConfiguration
143-
org.springframework.boot.autoconfigure.web.servlet.ServletWebServerFactoryAutoConfiguration
144-
org.springframework.boot.autoconfigure.web.servlet.error.ErrorMvcAutoConfiguration
145143
org.springframework.boot.autoconfigure.web.servlet.HttpEncodingAutoConfiguration
146144
org.springframework.boot.autoconfigure.web.servlet.MultipartAutoConfiguration
145+
org.springframework.boot.autoconfigure.web.servlet.ServletWebServerFactoryAutoConfiguration
147146
org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration
148-
org.springframework.boot.autoconfigure.websocket.reactive.WebSocketReactiveAutoConfiguration
149-
org.springframework.boot.autoconfigure.websocket.servlet.WebSocketServletAutoConfiguration
150-
org.springframework.boot.autoconfigure.websocket.servlet.WebSocketMessagingAutoConfiguration
147+
org.springframework.boot.autoconfigure.web.servlet.error.ErrorMvcAutoConfiguration
151148
org.springframework.boot.autoconfigure.webservices.WebServicesAutoConfiguration
152149
org.springframework.boot.autoconfigure.webservices.client.WebServiceTemplateAutoConfiguration
150+
org.springframework.boot.autoconfigure.websocket.reactive.WebSocketReactiveAutoConfiguration
151+
org.springframework.boot.autoconfigure.websocket.servlet.WebSocketMessagingAutoConfiguration
152+
org.springframework.boot.autoconfigure.websocket.servlet.WebSocketServletAutoConfiguration

0 commit comments

Comments
 (0)