Skip to content

Commit

Permalink
feature(refactoring):xxx fixed commit id on docker hub image.
Browse files Browse the repository at this point in the history
  • Loading branch information
ds-mwesener committed Jun 18, 2024
1 parent 507e7c9 commit 634651e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 84 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ public class PolicyStartUpConfig {
public void registerDecentralRegistryPermissions() throws JsonProcessingException {
ObjectMapper mapper = new ObjectMapper();
mapper.registerModule(new JavaTimeModule());
mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
List<AcceptedPolicy> acceptedPolicy = buildAcceptedPolicies();
defaultAcceptedPoliciesProvider.addAcceptedPolicies(acceptedPolicy);
log.info("Successfully added permission to irs client lib provider: {}", mapper.writeValueAsString(acceptedPolicy));
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ public RestTemplate edcRestTemplate(@Autowired EdcProperties edcProperties) {
.rootUri(edcProperties.getProviderEdcUrl())
.defaultHeader(EDC_API_KEY_HEADER_NAME, edcProperties.getApiAuthKey())
.setConnectTimeout(Duration.ofSeconds(10L))
// .additionalInterceptors(new RequestResponseLoggingInterceptor())
.setReadTimeout(Duration.ofSeconds(25L))
.build();
}
Expand All @@ -116,7 +115,6 @@ public RestTemplate edcDtrAssetRestTemplate(@Autowired EdcProperties edcProperti
.defaultHeader("Content-Type", MediaType.APPLICATION_JSON_VALUE)
.defaultHeader(EDC_API_KEY_HEADER_NAME, edcProperties.getApiAuthKey())
.setConnectTimeout(Duration.ofSeconds(10L))
// .additionalInterceptors(new RequestResponseLoggingInterceptor())
.setReadTimeout(Duration.ofSeconds(25L))
.build();
}
Expand All @@ -132,7 +130,6 @@ public RestTemplate digitalTwinRegistryCreateShellRestTemplate() {
public RestTemplate edcNotificationTemplate(@Autowired EdcProperties edcProperties) {
return new RestTemplateBuilder()
.defaultHeader(EDC_API_KEY_HEADER_NAME, edcProperties.getApiAuthKey())
// .additionalInterceptors(new RequestResponseLoggingInterceptor())
.build();
}

Expand Down Expand Up @@ -183,17 +180,8 @@ public RestTemplate digitalTwinRegistryRestTemplate(
/* RestTemplate used by the edc client library*/
@Bean(EDC_CLIENT_REST_TEMPLATE)
public RestTemplate edcClientRestTemplate() {
ClientHttpRequestFactory factory = new BufferingClientHttpRequestFactory(new SimpleClientHttpRequestFactory());
RestTemplate restTemplate = new RestTemplate(factory);

List<ClientHttpRequestInterceptor> interceptors = restTemplate.getInterceptors();
if (CollectionUtils.isEmpty(interceptors)) {
interceptors = new ArrayList<>();
}
// interceptors.add(new RequestResponseLoggingInterceptor());
restTemplate.setErrorHandler(new DefaultResponseErrorHandler());
// restTemplate.setInterceptors(interceptors);
return restTemplate;
return new RestTemplateBuilder()
.build();
}

private RestTemplateBuilder oAuthRestTemplate(final RestTemplateBuilder restTemplateBuilder,
Expand Down

0 comments on commit 634651e

Please sign in to comment.