Skip to content

WebTestClient base path is not set to the application context path #24168

@20fps

Description

@20fps

For TestRestClient context path is autoconfigured as base by default, it is a bit confusing to have both clients autoconfigured with the different base paths.
Also I don't see any possibility to configure base path for WebTestClient since it is hardcoded on creation:
return builder.baseUrl(baseUrl).build();

Now I understand why servlet.contextPath is not used since it is not reactive based, but if it is possible to use for non-reactive it should be at least configurable.

I'd like to have possibility to customize base path for WebTestClient.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions