In spring-boot-resttestclient, both RestTestClientAutoConfiguration and TestRestTemplateAutoConfiguration are intentionally not registered in AutoConfiguration.imports. Instead, they are opted into through @AutoConfigureRestTestClient and @AutoConfigureTestRestTemplate respectively. Given this, there's no need for the classes to be public.
Making them package-private would align with JacksonTesterTestAutoConfiguration, JsonbTesterTestAutoConfiguration, and the like. These auto-configuration classes are opted into through an annotation (@AutoConfigureJsonTesters) and they're package-private. They're also named …TestAutoConfiguration and, for consistency, we may want to rename TestRestTemplateAutoConfiguration to TestRestTemplateTestAutoConfiguration and RestTestClientAutoConfiguration to RestTestClientTestAutoConfiguration.
I'd like to discuss this change with the team to double-check that it's a change that we think is worth making and to decide when to make it (4.0.x and 4.1).
In
spring-boot-resttestclient, bothRestTestClientAutoConfigurationandTestRestTemplateAutoConfigurationare intentionally not registered inAutoConfiguration.imports. Instead, they are opted into through@AutoConfigureRestTestClientand@AutoConfigureTestRestTemplaterespectively. Given this, there's no need for the classes to be public.Making them package-private would align with
JacksonTesterTestAutoConfiguration,JsonbTesterTestAutoConfiguration, and the like. These auto-configuration classes are opted into through an annotation (@AutoConfigureJsonTesters) and they're package-private. They're also named…TestAutoConfigurationand, for consistency, we may want to renameTestRestTemplateAutoConfigurationtoTestRestTemplateTestAutoConfigurationandRestTestClientAutoConfigurationtoRestTestClientTestAutoConfiguration.I'd like to discuss this change with the team to double-check that it's a change that we think is worth making and to decide when to make it (4.0.x and 4.1).