Rename Import*AutoConfiguration classes

Rename Import*AutoConfiguration classes to AutoConfigure*.

Fixes gh-5692
pull/5645/merge
Phillip Webb 9 years ago
parent a65bed47fc
commit 21bc166c95

@ -39,6 +39,6 @@ import org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration;
@Retention(RetentionPolicy.RUNTIME)
@Documented
@ImportAutoConfiguration({ GsonAutoConfiguration.class, JacksonAutoConfiguration.class })
public @interface ImportJsonAutoConfiguration {
public @interface AutoConfigurationJson {
}

@ -27,9 +27,29 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.test.autoconfigure.OverrideAutoConfiguration;
import org.springframework.boot.test.autoconfigure.filter.TypeExcludeFilters;
import org.springframework.boot.test.context.SpringBootTestContextBootstrapper;
import org.springframework.boot.test.json.GsonTester;
import org.springframework.boot.test.json.JacksonTester;
import org.springframework.context.annotation.ComponentScan.Filter;
import org.springframework.test.context.BootstrapWith;
/**
* Annotation that can be used in combination with {@code @RunWith(SpringRunner.class)}
* for a typical JSON test. Can be used when a test focuses <strong>only</strong> on JSON
* serialization.
* <p>
* Using this annotation will disable full auto-configuration and instead apply only
* configuration relevant to Json tests (i.e. {@code @JsonComponent}, Jackson
* {@code Module})
* <p>
* By default, tests annotated with {@code JsonTest} will also initialize
* {@link JacksonTester} and {@link GsonTester} fields. More fine-grained control can be
* provided via the {@link AutoConfigureJsonTesters @AutoConfigureJsonTesters} annotation.
*
* @author Phillip Webb
* @see AutoConfigurationJson
* @see AutoConfigureJsonTesters
* @since 1.4.0
*/
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@ -37,7 +57,7 @@ import org.springframework.test.context.BootstrapWith;
@BootstrapWith(SpringBootTestContextBootstrapper.class)
@OverrideAutoConfiguration(enabled = false)
@TypeExcludeFilters(JsonExcludeFilter.class)
@ImportJsonAutoConfiguration
@AutoConfigurationJson
@AutoConfigureJsonTesters
public @interface JsonTest {

@ -45,6 +45,6 @@ import org.springframework.boot.autoconfigure.transaction.TransactionAutoConfigu
JpaRepositoriesAutoConfiguration.class, TransactionAutoConfiguration.class,
DataSourceTransactionManagerAutoConfiguration.class,
DataSourceAutoConfiguration.class })
public @interface ImportDataJpaAutoConfiguration {
public @interface AutoConfigureDataJpa {
}

@ -62,7 +62,7 @@ import org.springframework.transaction.annotation.Transactional;
@OverrideAutoConfiguration(enabled = false)
@TypeExcludeFilters(DataJpaTypeExcludeFilter.class)
@Transactional
@ImportDataJpaAutoConfiguration
@AutoConfigureDataJpa
@AutoConfigureTestDatabase
@AutoConfigureTestEntityManager
public @interface DataJpaTest {

@ -42,6 +42,6 @@ import org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration;
@Documented
@ImportAutoConfiguration({ WebMvcAutoConfiguration.class, GsonAutoConfiguration.class,
JacksonAutoConfiguration.class, HttpMessageConvertersAutoConfiguration.class })
public @interface ImportWebMvcAutoConfiguration {
public @interface AutoConfigureWebMvc {
}

@ -37,7 +37,7 @@ import org.springframework.web.context.WebApplicationContext;
*
* @author Phillip Webb
* @author Andy Wilkinson
* @see ImportWebMvcAutoConfiguration
* @see AutoConfigureWebMvc
*/
@Configuration
@ConditionalOnWebApplication

@ -69,7 +69,7 @@ import org.springframework.test.web.servlet.MockMvc;
@BootstrapWith(WebMvcTestContextBootstrapper.class)
@OverrideAutoConfiguration(enabled = false)
@TypeExcludeFilters(WebMvcTypeExcludeFilter.class)
@ImportWebMvcAutoConfiguration
@AutoConfigureWebMvc
@AutoConfigureMockMvc
public @interface WebMvcTest {

Loading…
Cancel
Save