JAVA-4012: clean-up

This commit is contained in:
sampadawagde 2021-01-24 23:46:39 +05:30
parent 0fe1563388
commit 992a33fe7d
1 changed files with 0 additions and 11 deletions

View File

@ -5,16 +5,13 @@ import java.util.Collection;
import java.util.Collections;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.convert.converter.Converter;
import org.springframework.data.mongodb.MongoDatabaseFactory;
import org.springframework.data.mongodb.MongoTransactionManager;
import org.springframework.data.mongodb.config.AbstractMongoClientConfiguration;
import org.springframework.data.mongodb.core.convert.MappingMongoConverter;
import org.springframework.data.mongodb.core.convert.MongoCustomConversions;
import org.springframework.data.mongodb.gridfs.GridFsTemplate;
import org.springframework.data.mongodb.repository.config.EnableMongoRepositories;
import com.baeldung.converter.UserWriterConverter;
@ -31,9 +28,6 @@ public class MongoConfig extends AbstractMongoClientConfiguration {
private final List<Converter<?, ?>> converters = new ArrayList<Converter<?, ?>>();
@Autowired
private MappingMongoConverter mongoConverter;
@Override
protected String getDatabaseName() {
return "test";
@ -69,11 +63,6 @@ public class MongoConfig extends AbstractMongoClientConfiguration {
return new MongoCustomConversions(converters);
}
@Bean
public GridFsTemplate gridFsTemplate() throws Exception {
return new GridFsTemplate(mongoDbFactory(), mongoConverter);
}
@Bean
MongoTransactionManager transactionManager(MongoDatabaseFactory dbFactory) {
return new MongoTransactionManager(dbFactory);