Remove auto-configuration for ServerProperties
This commit removes `ServerProperties` and `ManagementServerProperties` auto-configurations. Those properties objects are now created using `@EnableConfigurationProperties` only. Closes gh-8108
This commit is contained in:
@@ -68,7 +68,7 @@ import org.springframework.security.config.annotation.web.configuration.WebSecur
|
||||
@Configuration
|
||||
@ConditionalOnProperty(prefix = "spring.devtools.remote", name = "secret")
|
||||
@ConditionalOnClass({ Filter.class, ServerHttpRequest.class })
|
||||
@EnableConfigurationProperties(DevToolsProperties.class)
|
||||
@EnableConfigurationProperties({ ServerProperties.class, DevToolsProperties.class })
|
||||
public class RemoteDevToolsAutoConfiguration {
|
||||
|
||||
private static final Log logger = LogFactory
|
||||
|
||||
@@ -26,7 +26,6 @@ import org.junit.rules.ExpectedException;
|
||||
|
||||
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
|
||||
import org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.web.ServerPropertiesAutoConfiguration;
|
||||
import org.springframework.boot.devtools.remote.server.DispatcherFilter;
|
||||
import org.springframework.boot.devtools.restart.MockRestarter;
|
||||
import org.springframework.boot.devtools.restart.server.HttpRestartServer;
|
||||
@@ -231,8 +230,7 @@ public class RemoteDevToolsAutoConfigurationTests {
|
||||
private void loadContext(String... properties) {
|
||||
this.context = new AnnotationConfigWebApplicationContext();
|
||||
this.context.setServletContext(new MockServletContext());
|
||||
this.context.register(Config.class, ServerPropertiesAutoConfiguration.class,
|
||||
PropertyPlaceholderAutoConfiguration.class);
|
||||
this.context.register(Config.class, PropertyPlaceholderAutoConfiguration.class);
|
||||
EnvironmentTestUtils.addEnvironment(this.context, properties);
|
||||
this.context.refresh();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user