blob: 12626b59d8a2bbe76407fc313ee471dc33210178 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
package com.juick.server.configuration;
import com.juick.server.ActivityPubManager;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.client.SimpleClientHttpRequestFactory;
import org.springframework.web.client.RestTemplate;
@Configuration
public class ActivityPubClientConfig {
@Bean
public RestTemplate apClient() {
SimpleClientHttpRequestFactory requestFactory = new SimpleClientHttpRequestFactory();
RestTemplate restTemplate = new RestTemplate(requestFactory);
restTemplate.setErrorHandler(new ActivityPubManager.ErrorHandler());
return restTemplate;
}
}
|