Skip to content

MockServerWebExchange does not allow setting the ApplicationContext on the base class #34601

Closed
@dsyer

Description

@dsyer

MockServerWebExchange does not have an ApplicationContext and the constructor that accepts it in the base class isn't visible, so the only workaround is to create your own DefaultServerWebExchange and override getApplicationContext().

Spring Security requires the ApplicationContext, so they apparently have this workaround in their test code, but it would be useful to share it.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions