Skip to content

Commit 737b4a2

Browse files
committed
Polish
1 parent 0f095ab commit 737b4a2

21 files changed

+41
-8
lines changed

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/endpoint/jmx/JmxEndpointAutoConfiguration.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
import org.springframework.boot.context.properties.EnableConfigurationProperties;
4545
import org.springframework.context.ApplicationContext;
4646
import org.springframework.context.annotation.Bean;
47+
import org.springframework.context.annotation.Configuration;
4748
import org.springframework.util.ObjectUtils;
4849

4950
/**
@@ -54,6 +55,7 @@
5455
* @author Phillip Webb
5556
* @since 2.0.0
5657
*/
58+
@Configuration
5759
@AutoConfigureAfter(JmxAutoConfiguration.class)
5860
@EnableConfigurationProperties(JmxEndpointProperties.class)
5961
public class JmxEndpointAutoConfiguration {

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/ServletEndpointManagementContextConfiguration.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public ExposeExcludePropertyEndpointFilter<ExposableServletEndpoint> servletExpo
5555

5656
@Configuration
5757
@ConditionalOnClass(DispatcherServlet.class)
58-
public class WebMvcServletEndpointManagementContextConfiguration {
58+
public static class WebMvcServletEndpointManagementContextConfiguration {
5959

6060
private final ApplicationContext context;
6161

@@ -80,7 +80,7 @@ public ServletEndpointRegistrar servletEndpointRegistrar(
8080
@Configuration
8181
@ConditionalOnClass(ResourceConfig.class)
8282
@ConditionalOnMissingClass("org.springframework.web.servlet.DispatcherServlet")
83-
public class JerseyServletEndpointManagementContextConfiguration {
83+
public static class JerseyServletEndpointManagementContextConfiguration {
8484

8585
@Bean
8686
public ServletEndpointRegistrar servletEndpointRegistrar(

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/CompositeMeterRegistryAutoConfiguration.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
2222
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
23+
import org.springframework.context.annotation.Configuration;
2324
import org.springframework.context.annotation.Import;
2425

2526
/**
@@ -29,6 +30,7 @@
2930
* @author Andy Wilkinson
3031
* @since 2.0.0
3132
*/
33+
@Configuration
3234
@Import({ NoOpMeterRegistryConfiguration.class,
3335
CompositeMeterRegistryConfiguration.class })
3436
@ConditionalOnClass(CompositeMeterRegistry.class)

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/NoOpMeterRegistryConfiguration.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,15 @@
2323
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
2424
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
2525
import org.springframework.context.annotation.Bean;
26+
import org.springframework.context.annotation.Configuration;
2627

2728
/**
2829
* Configuration for a no-op meter registry when the context does not contain an
2930
* auto-configured {@link MeterRegistry}.
3031
*
3132
* @author Andy Wilkinson
3233
*/
34+
@Configuration
3335
@ConditionalOnBean(Clock.class)
3436
@ConditionalOnMissingBean(MeterRegistry.class)
3537
class NoOpMeterRegistryConfiguration {

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/web/tomcat/TomcatMetricsAutoConfiguration.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,15 @@
3131
import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
3232
import org.springframework.boot.web.server.WebServerFactoryCustomizer;
3333
import org.springframework.context.annotation.Bean;
34+
import org.springframework.context.annotation.Configuration;
3435

3536
/**
3637
* {@link EnableAutoConfiguration Auto-configuration} for {@link TomcatMetrics}.
3738
*
3839
* @author Andy Wilkinson
3940
* @since 2.0.0
4041
*/
42+
@Configuration
4143
@ConditionalOnWebApplication
4244
@ConditionalOnClass({ TomcatMetrics.class, Manager.class })
4345
public class TomcatMetricsAutoConfiguration {

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/trace/http/HttpTraceAutoConfiguration.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ public HttpExchangeTracer httpExchangeTracer(HttpTraceProperties traceProperties
5454
return new HttpExchangeTracer(traceProperties.getInclude());
5555
}
5656

57+
@Configuration
5758
@ConditionalOnWebApplication(type = Type.SERVLET)
5859
static class ServletTraceFilterConfiguration {
5960

@@ -66,6 +67,7 @@ public HttpTraceFilter httpTraceFilter(HttpTraceRepository repository,
6667

6768
}
6869

70+
@Configuration
6971
@ConditionalOnWebApplication(type = Type.REACTIVE)
7072
static class ReactiveTraceFilterConfiguration {
7173

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/servlet/ServletManagementChildContextConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public TomcatAccessLogCustomizer tomcatAccessLogCustomizer() {
8383
@Configuration
8484
@ConditionalOnClass({ EnableWebSecurity.class, Filter.class })
8585
@ConditionalOnBean(name = BeanIds.SPRING_SECURITY_FILTER_CHAIN, search = SearchStrategy.ANCESTORS)
86-
class ServletManagementContextSecurityConfiguration {
86+
static class ServletManagementContextSecurityConfiguration {
8787

8888
@Bean
8989
public Filter springSecurityFilterChain(HierarchicalBeanFactory beanFactory) {

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/dao/PersistenceExceptionTranslationAutoConfiguration.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
2222
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
2323
import org.springframework.context.annotation.Bean;
24+
import org.springframework.context.annotation.Configuration;
2425
import org.springframework.core.env.Environment;
2526
import org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor;
2627

@@ -33,6 +34,7 @@
3334
* @author Madhura Bhave
3435
* @since 1.2.0
3536
*/
37+
@Configuration
3638
@ConditionalOnClass(PersistenceExceptionTranslationPostProcessor.class)
3739
public class PersistenceExceptionTranslationAutoConfiguration {
3840

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/hateoas/HypermediaHttpMessageConverterConfiguration.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2017 the original author or authors.
2+
* Copyright 2012-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -29,6 +29,7 @@
2929
import org.springframework.beans.factory.config.BeanPostProcessor;
3030
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
3131
import org.springframework.context.annotation.Bean;
32+
import org.springframework.context.annotation.Configuration;
3233
import org.springframework.hateoas.mvc.TypeConstrainedMappingJackson2HttpMessageConverter;
3334
import org.springframework.http.MediaType;
3435
import org.springframework.http.converter.AbstractHttpMessageConverter;
@@ -41,6 +42,7 @@
4142
*
4243
* @author Andy Wilkinson
4344
*/
45+
@Configuration
4446
public class HypermediaHttpMessageConverterConfiguration {
4547

4648
@Bean

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastClientConfiguration.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2017 the original author or authors.
2+
* Copyright 2012-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -36,6 +36,7 @@
3636
* @author Vedran Pavic
3737
* @author Stephane Nicoll
3838
*/
39+
@Configuration
3940
@ConditionalOnClass(HazelcastClient.class)
4041
@ConditionalOnMissingBean(HazelcastInstance.class)
4142
class HazelcastClientConfiguration {

0 commit comments

Comments
 (0)