Class WebTestClientConfiguration

java.lang.Object
ir.msob.jima.security.api.restful.test.WebTestClientConfiguration

@Configuration public class WebTestClientConfiguration extends Object
This configuration class, WebTestClientConfiguration, is responsible for configuring and customizing the behavior of WebClient instances. It sets up OAuth2 client integration, load balancing, and logging of requests.

Author: Yaqub Abdi

  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.test.web.reactive.server.WebTestClient
    webTestClient(org.springframework.test.web.reactive.server.WebTestClient.Builder builder)
    Create a primary WebTestClient instance for making HTTP requests.
    org.springframework.test.web.reactive.server.WebTestClient.Builder
    webTestClientBuilder(org.springframework.security.oauth2.client.AuthorizedClientServiceReactiveOAuth2AuthorizedClientManager authorizedClientManager)
    Create a primary WebTestClient.Builder with OAuth2 integration.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • WebTestClientConfiguration

      public WebTestClientConfiguration()
  • Method Details

    • webTestClient

      @Bean @Primary public org.springframework.test.web.reactive.server.WebTestClient webTestClient(org.springframework.test.web.reactive.server.WebTestClient.Builder builder)
      Create a primary WebTestClient instance for making HTTP requests.
      Parameters:
      builder - The WebTestClient.Builder used to create the WebTestClient instance.
      Returns:
      The primary WebTestClient instance.
    • webTestClientBuilder

      @Bean @Primary public org.springframework.test.web.reactive.server.WebTestClient.Builder webTestClientBuilder(org.springframework.security.oauth2.client.AuthorizedClientServiceReactiveOAuth2AuthorizedClientManager authorizedClientManager)
      Create a primary WebTestClient.Builder with OAuth2 integration.
      Parameters:
      authorizedClientManager - The manager for OAuth2 authorized clients.
      Returns:
      The WebTestClient.Builder instance.