From 41bc3b386ee4497d28cc2c3c7e6b0c6fb66a3217 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Tue, 28 Jul 2015 15:20:59 +0200 Subject: [PATCH] Rename ManagementSecurityAutoConfiguration Since `ManagementSecurityAutoConfiguration` is cnfiguring web-related things, it has been renamed to `ManagementWebSecurityAutoConfiguration`. Closes gh-2163 --- .../autoconfigure/CrshAutoConfiguration.java | 4 ++-- ...ndpointWebMvcChildContextConfiguration.java | 2 +- .../JolokiaAutoConfiguration.java | 4 ++-- ...anagementWebSecurityAutoConfiguration.java} | 2 +- .../main/resources/META-INF/spring.factories | 2 +- ...mentWebSecurityAutoConfigurationTests.java} | 18 +++++++++--------- 6 files changed, 16 insertions(+), 16 deletions(-) rename spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/{ManagementSecurityAutoConfiguration.java => ManagementWebSecurityAutoConfiguration.java} (99%) rename spring-boot-actuator/src/test/java/org/springframework/boot/actuate/autoconfigure/{ManagementSecurityAutoConfigurationTests.java => ManagementWebSecurityAutoConfigurationTests.java} (96%) diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/CrshAutoConfiguration.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/CrshAutoConfiguration.java index d74885cb64..324ff07812 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/CrshAutoConfiguration.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/CrshAutoConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2015 the original author or authors. + * Copyright 2012-2015 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,7 +116,7 @@ import org.springframework.util.StringUtils; @ConditionalOnClass({ PluginLifeCycle.class }) @EnableConfigurationProperties({ ShellProperties.class }) @AutoConfigureAfter({ SecurityAutoConfiguration.class, - ManagementSecurityAutoConfiguration.class }) + ManagementWebSecurityAutoConfiguration.class }) public class CrshAutoConfiguration { @Autowired diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/EndpointWebMvcChildContextConfiguration.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/EndpointWebMvcChildContextConfiguration.java index 03f1997d5f..eb0167be5e 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/EndpointWebMvcChildContextConfiguration.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/EndpointWebMvcChildContextConfiguration.java @@ -32,7 +32,7 @@ import org.springframework.beans.factory.HierarchicalBeanFactory; import org.springframework.beans.factory.ListableBeanFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; -import org.springframework.boot.actuate.autoconfigure.ManagementSecurityAutoConfiguration.ManagementWebSecurityConfigurerAdapter; +import org.springframework.boot.actuate.autoconfigure.ManagementWebSecurityAutoConfiguration.ManagementWebSecurityConfigurerAdapter; import org.springframework.boot.actuate.endpoint.mvc.EndpointHandlerMapping; import org.springframework.boot.actuate.endpoint.mvc.ManagementErrorEndpoint; import org.springframework.boot.actuate.endpoint.mvc.MvcEndpoint; diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/JolokiaAutoConfiguration.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/JolokiaAutoConfiguration.java index 390e3e044b..21ddc6a1e4 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/JolokiaAutoConfiguration.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/JolokiaAutoConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2015 the original author or authors. + * Copyright 2012-2015 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.core.type.AnnotatedTypeMetadata; @ConditionalOnWebApplication @ConditionalOnClass({ AgentServlet.class }) @Conditional(JolokiaCondition.class) -@AutoConfigureBefore(ManagementSecurityAutoConfiguration.class) +@AutoConfigureBefore(ManagementWebSecurityAutoConfiguration.class) @AutoConfigureAfter(EmbeddedServletContainerAutoConfiguration.class) @EnableConfigurationProperties(JolokiaProperties.class) public class JolokiaAutoConfiguration { diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/ManagementSecurityAutoConfiguration.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/ManagementWebSecurityAutoConfiguration.java similarity index 99% rename from spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/ManagementSecurityAutoConfiguration.java rename to spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/ManagementWebSecurityAutoConfiguration.java index c735e32655..f9c4c40035 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/ManagementSecurityAutoConfiguration.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/ManagementWebSecurityAutoConfiguration.java @@ -90,7 +90,7 @@ import org.springframework.util.StringUtils; @AutoConfigureAfter(SecurityAutoConfiguration.class) @AutoConfigureBefore(FallbackWebSecurityAutoConfiguration.class) @EnableConfigurationProperties -public class ManagementSecurityAutoConfiguration { +public class ManagementWebSecurityAutoConfiguration { private static final String[] NO_PATHS = new String[0]; diff --git a/spring-boot-actuator/src/main/resources/META-INF/spring.factories b/spring-boot-actuator/src/main/resources/META-INF/spring.factories index 99bb7f3862..3874247ead 100644 --- a/spring-boot-actuator/src/main/resources/META-INF/spring.factories +++ b/spring-boot-actuator/src/main/resources/META-INF/spring.factories @@ -7,8 +7,8 @@ org.springframework.boot.actuate.autoconfigure.EndpointMBeanExportAutoConfigurat org.springframework.boot.actuate.autoconfigure.EndpointWebMvcAutoConfiguration,\ org.springframework.boot.actuate.autoconfigure.HealthIndicatorAutoConfiguration,\ org.springframework.boot.actuate.autoconfigure.JolokiaAutoConfiguration,\ -org.springframework.boot.actuate.autoconfigure.ManagementSecurityAutoConfiguration,\ org.springframework.boot.actuate.autoconfigure.ManagementServerPropertiesAutoConfiguration,\ +org.springframework.boot.actuate.autoconfigure.ManagementWebSecurityAutoConfiguration,\ org.springframework.boot.actuate.autoconfigure.MetricFilterAutoConfiguration,\ org.springframework.boot.actuate.autoconfigure.MetricRepositoryAutoConfiguration,\ org.springframework.boot.actuate.autoconfigure.MetricsDropwizardAutoConfiguration,\ diff --git a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/autoconfigure/ManagementSecurityAutoConfigurationTests.java b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/autoconfigure/ManagementWebSecurityAutoConfigurationTests.java similarity index 96% rename from spring-boot-actuator/src/test/java/org/springframework/boot/actuate/autoconfigure/ManagementSecurityAutoConfigurationTests.java rename to spring-boot-actuator/src/test/java/org/springframework/boot/actuate/autoconfigure/ManagementWebSecurityAutoConfigurationTests.java index 70a0e89c3c..2f692e9876 100644 --- a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/autoconfigure/ManagementSecurityAutoConfigurationTests.java +++ b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/autoconfigure/ManagementWebSecurityAutoConfigurationTests.java @@ -61,12 +61,12 @@ import static org.junit.Assert.assertThat; import static org.junit.Assert.assertTrue; /** - * Tests for {@link ManagementSecurityAutoConfiguration}. + * Tests for {@link ManagementWebSecurityAutoConfiguration}. * * @author Dave Syer * @author Andy Wilkinson */ -public class ManagementSecurityAutoConfigurationTests { +public class ManagementWebSecurityAutoConfigurationTests { private AnnotationConfigWebApplicationContext context; @@ -82,7 +82,7 @@ public class ManagementSecurityAutoConfigurationTests { this.context = new AnnotationConfigWebApplicationContext(); this.context.setServletContext(new MockServletContext()); this.context.register(SecurityAutoConfiguration.class, - ManagementSecurityAutoConfiguration.class, + ManagementWebSecurityAutoConfiguration.class, JacksonAutoConfiguration.class, HttpMessageConvertersAutoConfiguration.class, EndpointAutoConfiguration.class, EndpointWebMvcAutoConfiguration.class, @@ -115,7 +115,7 @@ public class ManagementSecurityAutoConfigurationTests { HttpMessageConvertersAutoConfiguration.class, ManagementServerPropertiesAutoConfiguration.class, SecurityAutoConfiguration.class, - ManagementSecurityAutoConfiguration.class, + ManagementWebSecurityAutoConfiguration.class, PropertyPlaceholderAutoConfiguration.class); this.context.refresh(); UserDetails user = getUser(); @@ -140,7 +140,7 @@ public class ManagementSecurityAutoConfigurationTests { this.context = new AnnotationConfigWebApplicationContext(); this.context.setServletContext(new MockServletContext()); this.context.register(SecurityAutoConfiguration.class, - ManagementSecurityAutoConfiguration.class, + ManagementWebSecurityAutoConfiguration.class, EndpointAutoConfiguration.class, ManagementServerPropertiesAutoConfiguration.class, PropertyPlaceholderAutoConfiguration.class); @@ -160,7 +160,7 @@ public class ManagementSecurityAutoConfigurationTests { EndpointWebMvcAutoConfiguration.class, ManagementServerPropertiesAutoConfiguration.class, SecurityAutoConfiguration.class, - ManagementSecurityAutoConfiguration.class, + ManagementWebSecurityAutoConfiguration.class, FallbackWebSecurityAutoConfiguration.class, PropertyPlaceholderAutoConfiguration.class); EnvironmentTestUtils.addEnvironment(this.context, "security.basic.enabled:false"); @@ -176,7 +176,7 @@ public class ManagementSecurityAutoConfigurationTests { this.context = new AnnotationConfigWebApplicationContext(); this.context.setServletContext(new MockServletContext()); this.context.register(TestConfiguration.class, SecurityAutoConfiguration.class, - ManagementSecurityAutoConfiguration.class, + ManagementWebSecurityAutoConfiguration.class, EndpointAutoConfiguration.class, ManagementServerPropertiesAutoConfiguration.class, PropertyPlaceholderAutoConfiguration.class); @@ -190,7 +190,7 @@ public class ManagementSecurityAutoConfigurationTests { this.context = new AnnotationConfigWebApplicationContext(); this.context.setServletContext(new MockServletContext()); this.context.register(TestConfiguration.class, SecurityAutoConfiguration.class, - ManagementSecurityAutoConfiguration.class, + ManagementWebSecurityAutoConfiguration.class, EndpointAutoConfiguration.class, ManagementServerPropertiesAutoConfiguration.class, PropertyPlaceholderAutoConfiguration.class); @@ -206,7 +206,7 @@ public class ManagementSecurityAutoConfigurationTests { this.context.setServletContext(new MockServletContext()); this.context .register(AuthenticationConfig.class, SecurityAutoConfiguration.class, - ManagementSecurityAutoConfiguration.class, + ManagementWebSecurityAutoConfiguration.class, JacksonAutoConfiguration.class, HttpMessageConvertersAutoConfiguration.class, EndpointAutoConfiguration.class,