Skip to content

spring.test.webclient.mockrestserviceserver.enabled is not aligned with its module's name #48193

@jonenst

Description

@jonenst

Hi, I was looking into the history of @AutoConfigureWebClient(registerRestTemplate=true). I saw AutoConfigureWebClient was renamed to AutoConfigureRestClient (awesome) and registerRestTemplate was removed in 9eb05eb with @philwebb looking into the naming side of things.

I still see

module/spring-boot-restclient-test/src/main/resources/META-INF/spring-configuration-metadata.json:      "name": "spring.test.webclient.register-rest-template",

this could be cleaned up I guess ?

Also it seems like in 2016 (springboot 1.4.0 wow) when AutoConfigureWebClient was created, the word "webclient" didn't mean webflux, it was more like a generic word. And so in 2016, AutoConfigureWebClient along with MockRestServiceServerAutoConfiguration were created with properties in the spring.test.webclient namespace, so maybe "spring.test.webclient.mockrestserviceserver" can be renamed as well ? I don't know what consequences this has at all so maybe it's not possible

For info, using git grep 'spring\.test\.webcl'
v3.5.6 has

@ConditionalOnBooleanProperty("spring.test.webclient.mockrestserviceserver.enabled")
@ConditionalOnBooleanProperty("spring.test.webclient.register-rest-template")

main currently only has

@ConditionalOnBooleanProperty("spring.test.webclient.mockrestserviceserver.enabled")

so renaming it would remove this last trace of things that have webclient in their name but are not related to webflux webclient.
(this ambiguous naming is what sent me to this rabbithole in the first place)

I'm not an expert so maybe I misunderstood all of this, if so please ignore/close this issue

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions