Commit 11a67d53 authored by Kishore Battula's avatar Kishore Battula
Browse files

Merge branch 'users/amaverma/makeBlobConditional' into 'master'

Adding conditional propery for blobStore class

See merge request osdu/platform/system/lib/cloud/azure/os-core-lib-azure!25
parents 923d8013 d70eef96
......@@ -79,4 +79,9 @@ Enabled transaction logger and slf4jlogger
| --- | --- | --- |
| `tenantInfo.container.name` | `TenantInfo` | cosmos container name |
| `azure.cosmosdb.database` | ex `dev-osdu-r2-db` | cosmos database name |
| `storage_account` | ex `testStorage` | storage account name |
\ No newline at end of file
## Settings to be added in application.properties to consume the BlobStore
| name | value | description |
| --- | --- | --- |
| `azure.blobStore.required` | `true` | - |
| `azure.storage.account-name` | ex `testStorage` | storage account name |
......@@ -21,7 +21,7 @@
<groupId>org.opengroup.osdu</groupId>
<artifactId>core-lib-azure</artifactId>
<packaging>jar</packaging>
<version>0.0.23</version>
<version>0.0.24</version>
<name>core-lib-azure</name>
<properties>
......
......@@ -20,12 +20,14 @@ import com.azure.storage.blob.BlobServiceClientBuilder;
import org.opengroup.osdu.azure.di.BlobStoreConfiguration;
import org.opengroup.osdu.common.Validators;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.stereotype.Component;
/**
* Implementation for IBlobServiceClientFactory.
*/
@Component
@ConditionalOnProperty(value = "azure.blobStore.required", havingValue = "true", matchIfMissing = false)
public class BlobServiceClientFactoryImpl implements IBlobServiceClientFactory {
private BlobServiceClient blobServiceClient;
......
......@@ -22,7 +22,7 @@ import com.azure.storage.blob.specialized.BlockBlobClient;
import org.opengroup.osdu.core.common.logging.ILogger;
import org.opengroup.osdu.core.common.model.http.AppException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.stereotype.Component;
import java.io.ByteArrayOutputStream;
......@@ -78,7 +78,7 @@ import java.util.Collections;;
*/
@Component
@Lazy
@ConditionalOnProperty(value = "azure.blobStore.required", havingValue = "true", matchIfMissing = false)
public class BlobStore {
@Autowired
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment