Skip to content

Add Kotlin example showing integration with WebTestClient #9998

Closed
@eleftherias

Description

@eleftherias

In Java code a WebTestClient can be configured as follows

WebTestClient
    .bindToApplicationContext(this.context)
    // add Spring Security test Support
    .apply(springSecurity())
    .configureClient()
    .filter(basicAuthentication())
    .build();

In Kotlin, it is not currently possible to use the apply method.
See spring-projects/spring-framework#20606 for more details and a workaround.

Once this issue is fixed, we should update the reference documentation to show the equivalent example in Kotlin.

Metadata

Metadata

Labels

in: docsAn issue in Documentation or samplesstatus: backportedAn issue that has been backported to maintenance branchesstatus: ideal-for-contributionAn issue that we actively are looking for someone to help us withtype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions