File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 11package vc .api ;
22
33import com .fasterxml .jackson .databind .ObjectMapper ;
4+ import org .springframework .beans .factory .annotation .Qualifier ;
45import org .springframework .beans .factory .annotation .Value ;
56import org .springframework .context .annotation .Bean ;
67import org .springframework .context .annotation .Configuration ;
@@ -34,8 +35,18 @@ public ApiClient apiClient(
3435 ));
3536 }
3637
38+ @ Bean (name = "chatsApiClient" )
39+ public ApiClient apiClientNames (
40+ final HttpClient .Builder httpClientBuilder ,
41+ final ObjectMapper objectMapper ,
42+ @ Value ("${API_KEY}" ) final String apiKey
43+ ) {
44+ return apiClient (httpClientBuilder , objectMapper , apiKey )
45+ .setReadTimeout (Duration .ofSeconds (60 ));
46+ }
47+
3748 @ Bean
38- public ChatsApi chatsApi (final ApiClient apiClient ) {
49+ public ChatsApi chatsApi (@ Qualifier ( "chatsApiClient" ) final ApiClient apiClient ) {
3950 return new ChatsApi (apiClient );
4051 }
4152
You can’t perform that action at this time.
0 commit comments