added dummy database and empty mongoclient for factory bean initialization
This commit is contained in:
parent
89f69dae7f
commit
d99b69eb1a
@ -1,11 +1,13 @@
|
||||
package com.knecon.fforesight.mongo.database.commons.service;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import com.knecon.fforesight.mongo.database.commons.exception.MongoDBTenantException;
|
||||
import com.knecon.fforesight.tenantcommons.TenantContext;
|
||||
import com.mongodb.client.MongoClient;
|
||||
import com.mongodb.client.MongoClients;
|
||||
import com.mongodb.client.MongoDatabase;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@ -20,14 +22,14 @@ public class MongoDataSources {
|
||||
@Bean
|
||||
public String databaseName() {
|
||||
|
||||
return mongoClientCache.getClientConnection(TenantContext.getTenantId()).database();
|
||||
return "dummy";
|
||||
}
|
||||
|
||||
|
||||
@Bean
|
||||
public MongoClient getMongoClient() {
|
||||
|
||||
return mongoClientCache.getClient(TenantContext.getTenantId());
|
||||
return MongoClients.create();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user