Restructure web auto-configuration
Restructure `org.springframework.boot.autoconfigure.web` to better align with the new package structure in `spring-boot`. Auto-configuration is now split into client, servlet and reactive sub-packages. In addition a new `http` package now handles common HTTP concerns. Fixes gh-8616
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2016 the original author or authors.
|
||||
* Copyright 2012-2017 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.
|
||||
@@ -18,7 +18,7 @@ package org.springframework.boot.test.autoconfigure.web.client;
|
||||
|
||||
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.boot.autoconfigure.web.WebClientAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.web.client.RestTemplateAutoConfiguration;
|
||||
import org.springframework.boot.web.client.RestTemplateBuilder;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
@@ -34,7 +34,7 @@ import org.springframework.web.client.RestTemplate;
|
||||
*/
|
||||
@Configuration
|
||||
@ConditionalOnProperty(prefix = "spring.test.webclient", name = "register-rest-template")
|
||||
@AutoConfigureAfter(WebClientAutoConfiguration.class)
|
||||
@AutoConfigureAfter(RestTemplateAutoConfiguration.class)
|
||||
public class WebClientRestTemplateAutoConfiguration {
|
||||
|
||||
@Bean
|
||||
|
||||
@@ -22,8 +22,8 @@ import org.springframework.boot.autoconfigure.AutoConfigureAfter;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type;
|
||||
import org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.web.WebMvcProperties;
|
||||
import org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.web.servlet.WebMvcProperties;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
|
||||
@@ -21,7 +21,7 @@ import java.util.Collections;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import org.springframework.boot.autoconfigure.web.ErrorAttributes;
|
||||
import org.springframework.boot.autoconfigure.web.servlet.error.ErrorAttributes;
|
||||
import org.springframework.boot.context.TypeExcludeFilter;
|
||||
import org.springframework.boot.jackson.JsonComponent;
|
||||
import org.springframework.boot.test.autoconfigure.filter.AnnotationCustomizableTypeExcludeFilter;
|
||||
|
||||
@@ -54,7 +54,7 @@ org.springframework.boot.test.autoconfigure.web.reactive.WebTestClientAutoConfig
|
||||
org.springframework.boot.test.autoconfigure.web.reactive.AutoConfigureWebFlux=\
|
||||
org.springframework.boot.autoconfigure.context.MessageSourceAutoConfiguration,\
|
||||
org.springframework.boot.autoconfigure.validation.ValidationAutoConfiguration,\
|
||||
org.springframework.boot.autoconfigure.webflux.WebFluxAnnotationAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.web.reactive.WebFluxAnnotationAutoConfiguration
|
||||
|
||||
# AutoConfigureMockMvc auto-configuration imports
|
||||
org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc=\
|
||||
@@ -79,9 +79,9 @@ org.springframework.boot.test.autoconfigure.orm.jpa.TestEntityManagerAutoConfigu
|
||||
org.springframework.boot.test.autoconfigure.web.client.AutoConfigureWebClient=\
|
||||
org.springframework.boot.test.autoconfigure.web.client.WebClientRestTemplateAutoConfiguration,\
|
||||
org.springframework.boot.autoconfigure.gson.GsonAutoConfiguration,\
|
||||
org.springframework.boot.autoconfigure.http.HttpMessageConvertersAutoConfiguration,\
|
||||
org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration,\
|
||||
org.springframework.boot.autoconfigure.web.HttpMessageConvertersAutoConfiguration,\
|
||||
org.springframework.boot.autoconfigure.web.WebClientAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.web.client.RestTemplateAutoConfiguration
|
||||
|
||||
# AutoConfigureWebMvc auto-configuration imports
|
||||
org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureWebMvc=\
|
||||
@@ -90,13 +90,13 @@ org.springframework.boot.autoconfigure.freemarker.FreeMarkerAutoConfiguration,\
|
||||
org.springframework.boot.autoconfigure.groovy.template.GroovyTemplateAutoConfiguration,\
|
||||
org.springframework.boot.autoconfigure.gson.GsonAutoConfiguration,\
|
||||
org.springframework.boot.autoconfigure.hateoas.HypermediaAutoConfiguration,\
|
||||
org.springframework.boot.autoconfigure.http.HttpMessageConvertersAutoConfiguration,\
|
||||
org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration,\
|
||||
org.springframework.boot.autoconfigure.mustache.MustacheAutoConfiguration,\
|
||||
org.springframework.boot.autoconfigure.thymeleaf.ThymeleafAutoConfiguration,\
|
||||
org.springframework.boot.autoconfigure.validation.ValidationAutoConfiguration,\
|
||||
org.springframework.boot.autoconfigure.web.ErrorMvcAutoConfiguration,\
|
||||
org.springframework.boot.autoconfigure.web.HttpMessageConvertersAutoConfiguration,\
|
||||
org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.web.servlet.error.ErrorMvcAutoConfiguration,\
|
||||
org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration
|
||||
|
||||
# DefaultTestExecutionListenersPostProcessors
|
||||
org.springframework.boot.test.context.DefaultTestExecutionListenersPostProcessor=\
|
||||
|
||||
@@ -24,7 +24,7 @@ import org.junit.rules.ExpectedException;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.autoconfigure.web.ErrorAttributes;
|
||||
import org.springframework.boot.autoconfigure.web.servlet.error.ErrorAttributes;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
import org.springframework.test.web.servlet.MockMvc;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user