Skip to content
Snippets Groups Projects
Verified Commit ba8fcd60 authored by Martin Weise's avatar Martin Weise
Browse files

Bean

parent 0dcb2aec
No related branches found
No related tags found
2 merge requests!422Fixed a library issue where the value could not be empty,!421Fixed a library issue where the value could not be empty
...@@ -4,14 +4,7 @@ import at.ac.tuwien.ifs.dbrepo.core.test.BaseTest; ...@@ -4,14 +4,7 @@ import at.ac.tuwien.ifs.dbrepo.core.test.BaseTest;
import lombok.Getter; import lombok.Getter;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.http.client.support.BasicAuthenticationInterceptor;
import org.springframework.web.client.RestTemplate;
import org.springframework.web.util.DefaultUriBuilderFactory;
import java.io.IOException;
@Getter @Getter
@Slf4j @Slf4j
...@@ -30,14 +23,4 @@ public class RabbitConfig extends BaseTest { ...@@ -30,14 +23,4 @@ public class RabbitConfig extends BaseTest {
@Value("${dbrepo.endpoints.brokerService}") @Value("${dbrepo.endpoints.brokerService}")
private String brokerEndpoint; private String brokerEndpoint;
@Bean
@Primary
public RestTemplate brokerRestTemplate() {
final RestTemplate restTemplate = new RestTemplate();
restTemplate.setUriTemplateHandler(new DefaultUriBuilderFactory(brokerEndpoint));
restTemplate.getInterceptors()
.add(new BasicAuthenticationInterceptor(USER_1_USERNAME, USER_1_PASSWORD));
return restTemplate;
}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment