Refactor services to inject RestTemplate via constructor
Updated all service classes to receive RestTemplate (and ObjectMapper where needed) through constructor injection instead of instantiating them directly. Removed the RestTemplateConfig class, as RestTemplate is now expected to be provided externally, improving testability and configuration flexibility.ACONNECT-DEPOSITACCOUNT-API
parent
63f10ef2fc
commit
10084bbd48
@ -1,15 +0,0 @@
|
||||
package com.mfsys.aconnect.configuration.config;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
|
||||
@Configuration
|
||||
public class RestTemplateConfig {
|
||||
|
||||
@Bean
|
||||
public RestTemplate restTemplate() {
|
||||
return new RestTemplate(new HttpComponentsClientHttpRequestFactory());
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue