Skip to content

Commit

Permalink
Only create HttpClient bean for token flows conditionally (#1276)
Browse files Browse the repository at this point in the history
The HttpClient bean is created for the XsuaaTokenFlows bean. However if the XsuaaTokenFlows bean is not created at all, the HttpClient still is. With this change the HttpClient is bound to the same conditions as the XsuaaTokenFlows bean.

Signed-off-by: Marc Becker <[email protected]>
  • Loading branch information
beckermarc authored Aug 28, 2023
1 parent 591cb3e commit 0f2952a
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ public XsuaaTokenFlows xsuaaTokenFlows(@Qualifier("tokenFlowHttpClient") Closeab
* @return the {@link CloseableHttpClient} instance.
*/
@Bean
@Conditional(PropertyConditions.class)
public CloseableHttpClient tokenFlowHttpClient(XsuaaServiceConfiguration xsuaaConfig) {
logger.info(
"If the performance for the token validation is degrading provide your own well configured HttpClientFactory implementation");
Expand Down

0 comments on commit 0f2952a

Please sign in to comment.