Skip to content
Snippets Groups Projects
Commit 005536ea authored by OZGCloud's avatar OZGCloud
Browse files

OZG-5681 setup primary bean

parent 2e8ec48a
No related branches found
No related tags found
No related merge requests found
...@@ -12,6 +12,7 @@ import org.springframework.context.ApplicationContext; ...@@ -12,6 +12,7 @@ import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Import; import org.springframework.context.annotation.Import;
import org.springframework.context.annotation.Primary;
import de.ozgcloud.apilib.alfa.AlfaService; import de.ozgcloud.apilib.alfa.AlfaService;
import de.ozgcloud.apilib.alfa.CommandAlfaService; import de.ozgcloud.apilib.alfa.CommandAlfaService;
...@@ -168,6 +169,7 @@ public class OzgCloudClientAutoConfiguration { ...@@ -168,6 +169,7 @@ public class OzgCloudClientAutoConfiguration {
} }
@Bean @Bean
@Primary
@ConditionalOnProperty("ozgcloud.command-manager.address") @ConditionalOnProperty("ozgcloud.command-manager.address")
OzgCloudCommandService grpcOzgCloudCommandService(CommandMapper commandMapper, OzgCloudCallContextProvider contextProvider) { OzgCloudCommandService grpcOzgCloudCommandService(CommandMapper commandMapper, OzgCloudCallContextProvider contextProvider) {
var channel = ManagedChannelBuilder.forTarget(commandManagerProperties.getAddress()).usePlaintext().build(); var channel = ManagedChannelBuilder.forTarget(commandManagerProperties.getAddress()).usePlaintext().build();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment