diff --git a/ozg-cloud-spring-boot-starter/src/main/java/de/ozgcloud/client/autoconfigure/OzgCloudClientAutoConfiguration.java b/ozg-cloud-spring-boot-starter/src/main/java/de/ozgcloud/client/autoconfigure/OzgCloudClientAutoConfiguration.java index eb491729a67782b5246a1bae2863c12e035d93e4..ac1567f71d53afe35b08a92504fa590bada70200 100644 --- a/ozg-cloud-spring-boot-starter/src/main/java/de/ozgcloud/client/autoconfigure/OzgCloudClientAutoConfiguration.java +++ b/ozg-cloud-spring-boot-starter/src/main/java/de/ozgcloud/client/autoconfigure/OzgCloudClientAutoConfiguration.java @@ -12,7 +12,6 @@ import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Import; -import org.springframework.context.annotation.Primary; import de.ozgcloud.apilib.alfa.AlfaService; import de.ozgcloud.apilib.alfa.CommandAlfaService; @@ -25,6 +24,7 @@ import de.ozgcloud.apilib.common.command.grpc.CommandMapper; import de.ozgcloud.apilib.common.command.grpc.GrpcOzgCloudCommandService; import de.ozgcloud.apilib.file.dummy.DummyOzgCloudFileService; import de.ozgcloud.apilib.file.grpc.GrpcOzgCloudFileService; +import de.ozgcloud.apilib.file.grpc.OzgCloudFileMapper; import de.ozgcloud.apilib.user.UserProfileMapper; import de.ozgcloud.apilib.vorgang.OzgCloudVorgangIdMapper; import de.ozgcloud.apilib.vorgang.OzgCloudVorgangService; @@ -198,6 +198,12 @@ public class OzgCloudClientAutoConfiguration { return new DummyAlfaService(); } + @Bean + @ConditionalOnProperty("ozgcloud.file-manager.address") + OzgCloudFileMapper fileMapper() { + return Mappers.getMapper(OzgCloudFileMapper.class); + } + // @Bean // @ConditionalOnProperty("ozgcloud.user-manager.address") // OzgCloudUserProfileService grpcOzgCloudUserProfileService(@GrpcClient("ozgcloud-user-manager") UserProfileServiceBlockingStub grpcStub,