@@ -0,0 +1,844 @@
+package net.davidvoid.thor.lightning.data.source;%0A%0Aimport com.mongodb.MongoClient;%0Aimport com.mongodb.client.MongoDatabase;%0Aimport org.springframework.context.annotation.Profile;%0Aimport org.springframework.stereotype.Component;%0A%0A/**%0A * Created by david on 4/6/16.%0A */%0A@Component%0A@Profile(%22dev-h%22)%0Apublic class LocalMongoDataSource implements MongoDataSource %7B%0A%0A    volatile MongoClient mongo = null;%0A    @Override%0A    public MongoClient getClient() %7B%0A        if (mongo != null) return mongo;%0A%0A        synchronized (this) %7B%0A            if (mongo != null) return mongo;%0A            mongo = createInstance();%0A            return mongo;%0A        %7D%0A    %7D%0A%0A    private MongoClient createInstance() %7B%0A        return new MongoClient();%0A    %7D%0A%0A    @Override%0A    public MongoDatabase getDatabase() %7B%0A        return getClient().getDatabase(%22test%22);%0A    %7D%0A%7D%0A

add local data source