Prepare for Milestone Release
Change all the `BUILD-SNAPSHOT`s to their latest Milestones Fix compatibility with those Milestones Upgrade to Spring AMQP 2.0.0.M1 Upgrade to Spring Data Kay Gemfire now is based on the Apache Geode, so changed all the imports to proper new packages MongoDB now is based on the Mongo 3 Driver, therefore many breaking changes. Mostly to the mapping part Fix Checkstyle violation Fix race condition in the `MongoDbInboundChannelAdapterIntegrationTests` around `QueueChannel` and tx commit Add `-s` to Travis Gradle command to see stack trace about `MongoDbMetadataStoreTests` problem Test only MongoDB module on Travis with -d Add addon to Travis to pull MongoDB-3.0 Fix `MongoDbAvailableRule` for MongoDB 3.0 Driver style Increase `serverSelectionTimeout` to `100` in the `MongoDbAvailableRule`. Looks like `0` isn't good value to get immediate answer
This commit is contained in:
committed by
Gary Russell
parent
9945d04edd
commit
c0a507c36c
@@ -78,9 +78,14 @@
|
||||
</int-mongodb:inbound-channel-adapter>
|
||||
|
||||
<int:transaction-synchronization-factory id="syncFactory">
|
||||
<int:after-commit expression="@documentCleaner.remove(#mongoTemplate, payload, headers.mongo_collectionName)" />
|
||||
<int:before-commit expression="@documentCleaner.remove(#mongoTemplate, payload, headers.mongo_collectionName)"/>
|
||||
<int:after-commit channel="afterCommitChannel"/>
|
||||
</int:transaction-synchronization-factory>
|
||||
|
||||
<int:channel id="afterCommitChannel">
|
||||
<int:queue />
|
||||
</int:channel>
|
||||
|
||||
<int-mongodb:inbound-channel-adapter id="mongoInboundAdapterWithConverter"
|
||||
channel="replyChannel"
|
||||
query="{'name' : 'Bob'}"
|
||||
|
||||
@@ -22,9 +22,9 @@ import static org.junit.Assert.assertNull;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.bson.Document;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.beans.factory.parsing.BeanDefinitionParsingException;
|
||||
@@ -45,7 +45,6 @@ import org.springframework.test.annotation.DirtiesContext;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
|
||||
import com.mongodb.DBObject;
|
||||
import com.mongodb.util.JSON;
|
||||
|
||||
/**
|
||||
@@ -64,6 +63,9 @@ public class MongoDbInboundChannelAdapterIntegrationTests extends MongoDbAvailab
|
||||
@Autowired
|
||||
private QueueChannel replyChannel;
|
||||
|
||||
@Autowired
|
||||
private QueueChannel afterCommitChannel;
|
||||
|
||||
@Autowired
|
||||
@Qualifier("mongoInboundAdapter")
|
||||
private SourcePollingChannelAdapter mongoInboundAdapter;
|
||||
@@ -117,7 +119,7 @@ public class MongoDbInboundChannelAdapterIntegrationTests extends MongoDbAvailab
|
||||
this.mongoInboundAdapterNamedFactory.start();
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
Message<List<DBObject>> message = (Message<List<DBObject>>) replyChannel.receive(10000);
|
||||
Message<List<Document>> message = (Message<List<Document>>) replyChannel.receive(10000);
|
||||
assertNotNull(message);
|
||||
assertEquals("Bob", message.getPayload().get(0).get("name"));
|
||||
|
||||
@@ -185,6 +187,8 @@ public class MongoDbInboundChannelAdapterIntegrationTests extends MongoDbAvailab
|
||||
|
||||
this.inboundAdapterWithOnSuccessDisposition.stop();
|
||||
|
||||
assertNotNull(this.afterCommitChannel.receive(10000));
|
||||
|
||||
assertNull(this.mongoTemplate.findOne(new Query(Criteria.where("name").is("Bob")), Person.class, "data"));
|
||||
this.replyChannel.purge(null);
|
||||
}
|
||||
|
||||
@@ -25,9 +25,10 @@ import static org.mockito.Mockito.verify;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.bson.Document;
|
||||
import org.bson.conversions.Bson;
|
||||
import org.junit.Test;
|
||||
import org.mockito.Mockito;
|
||||
|
||||
import org.springframework.beans.factory.BeanFactory;
|
||||
import org.springframework.data.mongodb.MongoDbFactory;
|
||||
import org.springframework.data.mongodb.core.MongoOperations;
|
||||
@@ -39,7 +40,6 @@ import org.springframework.expression.common.LiteralExpression;
|
||||
import org.springframework.integration.mongodb.rules.MongoDbAvailable;
|
||||
import org.springframework.integration.mongodb.rules.MongoDbAvailableTests;
|
||||
|
||||
import com.mongodb.DBObject;
|
||||
import com.mongodb.util.JSON;
|
||||
|
||||
/**
|
||||
@@ -75,8 +75,7 @@ public class MongoDbMessageSourceTests extends MongoDbAvailableTests {
|
||||
|
||||
@Test
|
||||
@MongoDbAvailable
|
||||
public void validateSuccessfullQueryWithSinigleElementIfOneInListAsDbObject() throws Exception {
|
||||
|
||||
public void validateSuccessfulQueryWithSingleElementIfOneInListAsDbObject() throws Exception {
|
||||
MongoDbFactory mongoDbFactory = this.prepareMongoFactory();
|
||||
|
||||
MongoTemplate template = new MongoTemplate(mongoDbFactory);
|
||||
@@ -87,16 +86,16 @@ public class MongoDbMessageSourceTests extends MongoDbAvailableTests {
|
||||
messageSource.setBeanFactory(mock(BeanFactory.class));
|
||||
messageSource.afterPropertiesSet();
|
||||
@SuppressWarnings("unchecked")
|
||||
List<DBObject> results = ((List<DBObject>) messageSource.receive().getPayload());
|
||||
List<Document> results = ((List<Document>) messageSource.receive().getPayload());
|
||||
assertEquals(1, results.size());
|
||||
DBObject resultObject = results.get(0);
|
||||
Document resultObject = results.get(0);
|
||||
|
||||
assertEquals("Oleg", resultObject.get("name"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@MongoDbAvailable
|
||||
public void validateSuccessfullQueryWithSinigleElementIfOneInList() throws Exception {
|
||||
public void validateSuccessfulQueryWithSingleElementIfOneInList() throws Exception {
|
||||
|
||||
MongoDbFactory mongoDbFactory = this.prepareMongoFactory();
|
||||
|
||||
@@ -118,7 +117,7 @@ public class MongoDbMessageSourceTests extends MongoDbAvailableTests {
|
||||
|
||||
@Test
|
||||
@MongoDbAvailable
|
||||
public void validateSuccessfullQueryWithSinigleElementIfOneInListAndSingleResult() throws Exception {
|
||||
public void validateSuccessfulQueryWithSingleElementIfOneInListAndSingleResult() throws Exception {
|
||||
|
||||
MongoDbFactory mongoDbFactory = this.prepareMongoFactory();
|
||||
|
||||
@@ -140,7 +139,7 @@ public class MongoDbMessageSourceTests extends MongoDbAvailableTests {
|
||||
|
||||
@Test
|
||||
@MongoDbAvailable
|
||||
public void validateSuccessfullSubObjectQueryWithSinigleElementIfOneInList() throws Exception {
|
||||
public void validateSuccessfulSubObjectQueryWithSingleElementIfOneInList() throws Exception {
|
||||
|
||||
MongoDbFactory mongoDbFactory = this.prepareMongoFactory();
|
||||
|
||||
@@ -161,7 +160,7 @@ public class MongoDbMessageSourceTests extends MongoDbAvailableTests {
|
||||
|
||||
@Test
|
||||
@MongoDbAvailable
|
||||
public void validateSuccessfullQueryWithMultipleElements() throws Exception {
|
||||
public void validateSuccessfulQueryWithMultipleElements() throws Exception {
|
||||
|
||||
MongoDbFactory mongoDbFactory = this.prepareMongoFactory();
|
||||
|
||||
@@ -181,7 +180,7 @@ public class MongoDbMessageSourceTests extends MongoDbAvailableTests {
|
||||
|
||||
@Test
|
||||
@MongoDbAvailable
|
||||
public void validateSuccessfullQueryWithNullReturn() throws Exception {
|
||||
public void validateSuccessfulQueryWithNullReturn() throws Exception {
|
||||
|
||||
MongoDbFactory mongoDbFactory = this.prepareMongoFactory();
|
||||
|
||||
@@ -200,7 +199,7 @@ public class MongoDbMessageSourceTests extends MongoDbAvailableTests {
|
||||
@SuppressWarnings("unchecked")
|
||||
@Test
|
||||
@MongoDbAvailable
|
||||
public void validateSuccessfullQueryWithCustomConverter() throws Exception {
|
||||
public void validateSuccessfulQueryWithCustomConverter() throws Exception {
|
||||
|
||||
MongoDbFactory mongoDbFactory = this.prepareMongoFactory();
|
||||
|
||||
@@ -220,13 +219,13 @@ public class MongoDbMessageSourceTests extends MongoDbAvailableTests {
|
||||
|
||||
List<Person> persons = (List<Person>) messageSource.receive().getPayload();
|
||||
assertEquals(3, persons.size());
|
||||
verify(converter, times(3)).read((Class<Person>) Mockito.any(), Mockito.any(DBObject.class));
|
||||
verify(converter, times(3)).read((Class<Person>) Mockito.any(), Mockito.any(Bson.class));
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Test
|
||||
@MongoDbAvailable
|
||||
public void validateSuccessfullQueryWithMongoTemplate() throws Exception {
|
||||
public void validateSuccessfulQueryWithMongoTemplate() throws Exception {
|
||||
|
||||
MongoDbFactory mongoDbFactory = this.prepareMongoFactory();
|
||||
|
||||
@@ -247,7 +246,7 @@ public class MongoDbMessageSourceTests extends MongoDbAvailableTests {
|
||||
|
||||
List<Person> persons = (List<Person>) messageSource.receive().getPayload();
|
||||
assertEquals(3, persons.size());
|
||||
verify(converter, times(3)).read((Class<Person>) Mockito.any(), Mockito.any(DBObject.class));
|
||||
verify(converter, times(3)).read((Class<Person>) Mockito.any(), Mockito.any(Bson.class));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -265,11 +264,12 @@ public class MongoDbMessageSourceTests extends MongoDbAvailableTests {
|
||||
messageSource.setExpectSingleResult(true);
|
||||
messageSource.setBeanFactory(mock(BeanFactory.class));
|
||||
messageSource.afterPropertiesSet();
|
||||
DBObject result = (DBObject) messageSource.receive().getPayload();
|
||||
Document result = (Document) messageSource.receive().getPayload();
|
||||
Object id = result.get("_id");
|
||||
result.put("company", "PepBoys");
|
||||
template.save(result, "data");
|
||||
result = (DBObject) messageSource.receive().getPayload();
|
||||
result = (Document) messageSource.receive().getPayload();
|
||||
assertEquals(id, result.get("_id"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -22,9 +22,9 @@ import static org.mockito.Mockito.spy;
|
||||
import static org.mockito.Mockito.times;
|
||||
import static org.mockito.Mockito.verify;
|
||||
|
||||
import org.bson.conversions.Bson;
|
||||
import org.junit.Test;
|
||||
import org.mockito.Mockito;
|
||||
|
||||
import org.springframework.beans.factory.BeanFactory;
|
||||
import org.springframework.data.mongodb.MongoDbFactory;
|
||||
import org.springframework.data.mongodb.core.MongoOperations;
|
||||
@@ -39,8 +39,6 @@ import org.springframework.integration.mongodb.rules.MongoDbAvailableTests;
|
||||
import org.springframework.integration.support.MessageBuilder;
|
||||
import org.springframework.messaging.Message;
|
||||
|
||||
import com.mongodb.DBObject;
|
||||
|
||||
/**
|
||||
* @author Amol Nayak
|
||||
* @author Oleg Zhurakousky
|
||||
@@ -122,7 +120,7 @@ public class MongoDbStoringMessageHandlerTests extends MongoDbAvailableTests {
|
||||
|
||||
assertEquals("Bob", person.getName());
|
||||
assertEquals("PA", person.getAddress().getState());
|
||||
verify(converter, times(1)).write(Mockito.any(), Mockito.any(DBObject.class));
|
||||
verify(converter, times(1)).write(Mockito.any(), Mockito.any(Bson.class));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -148,6 +146,6 @@ public class MongoDbStoringMessageHandlerTests extends MongoDbAvailableTests {
|
||||
|
||||
assertEquals("Bob", person.getName());
|
||||
assertEquals("PA", person.getAddress().getState());
|
||||
verify(converter, times(1)).write(Mockito.any(), Mockito.any(DBObject.class));
|
||||
verify(converter, times(1)).write(Mockito.any(), Mockito.any(Bson.class));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2013 the original author or authors.
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -22,7 +22,6 @@ import org.junit.rules.MethodRule;
|
||||
import org.junit.runners.model.FrameworkMethod;
|
||||
import org.junit.runners.model.Statement;
|
||||
|
||||
import com.mongodb.Mongo;
|
||||
import com.mongodb.MongoClient;
|
||||
import com.mongodb.MongoClientOptions;
|
||||
import com.mongodb.ServerAddress;
|
||||
@@ -32,6 +31,8 @@ import com.mongodb.ServerAddress;
|
||||
*
|
||||
* @author Oleg Zhurakousky
|
||||
* @author Gary Russell
|
||||
* @author Artem Bilan
|
||||
*
|
||||
* @since 2.1
|
||||
*/
|
||||
public final class MongoDbAvailableRule implements MethodRule {
|
||||
@@ -46,9 +47,12 @@ public final class MongoDbAvailableRule implements MethodRule {
|
||||
MongoDbAvailable mongoAvailable = method.getAnnotation(MongoDbAvailable.class);
|
||||
if (mongoAvailable != null) {
|
||||
try {
|
||||
MongoClientOptions options = new MongoClientOptions.Builder().connectTimeout(100).build();
|
||||
Mongo mongo = new MongoClient(ServerAddress.defaultHost(), options);
|
||||
mongo.getDatabaseNames();
|
||||
MongoClientOptions options = new MongoClientOptions.Builder()
|
||||
.serverSelectionTimeout(100)
|
||||
.build();
|
||||
MongoClient mongo = new MongoClient(ServerAddress.defaultHost(), options);
|
||||
mongo.listDatabaseNames()
|
||||
.first();
|
||||
}
|
||||
catch (Exception e) {
|
||||
logger.warn("MongoDb is not available. Skipping the test: " +
|
||||
|
||||
@@ -16,10 +16,8 @@
|
||||
|
||||
package org.springframework.integration.mongodb.rules;
|
||||
|
||||
import com.mongodb.DBObject;
|
||||
import com.mongodb.MongoClient;
|
||||
import org.bson.conversions.Bson;
|
||||
import org.junit.Rule;
|
||||
|
||||
import org.springframework.data.mapping.context.MappingContext;
|
||||
import org.springframework.data.mongodb.MongoDbFactory;
|
||||
import org.springframework.data.mongodb.core.MongoTemplate;
|
||||
@@ -29,6 +27,8 @@ import org.springframework.data.mongodb.core.convert.MappingMongoConverter;
|
||||
import org.springframework.data.mongodb.core.mapping.MongoPersistentEntity;
|
||||
import org.springframework.data.mongodb.core.mapping.MongoPersistentProperty;
|
||||
|
||||
import com.mongodb.MongoClient;
|
||||
|
||||
/**
|
||||
* Convenience base class that enables unit test methods to rely upon the {@link MongoDbAvailable} annotation.
|
||||
*
|
||||
@@ -148,12 +148,12 @@ public abstract class MongoDbAvailableTests {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(Object source, DBObject target) {
|
||||
public void write(Object source, Bson target) {
|
||||
super.write(source, target);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <S> S read(Class<S> clazz, DBObject source) {
|
||||
public <S> S read(Class<S> clazz, Bson source) {
|
||||
return super.read(clazz, source);
|
||||
}
|
||||
|
||||
|
||||
@@ -378,9 +378,9 @@ public abstract class AbstractMongoDbMessageGroupStoreTests extends MongoDbAvail
|
||||
MessageGroupStore store2 = this.getMessageGroupStore();
|
||||
|
||||
Message<?> message = new GenericMessage<String>("1");
|
||||
store2.addMessagesToGroup(1, message);
|
||||
store1.addMessagesToGroup(2, new GenericMessage<String>("2"));
|
||||
store2.addMessagesToGroup(3, new GenericMessage<String>("3"));
|
||||
store2.addMessagesToGroup("1", message);
|
||||
store1.addMessagesToGroup("2", new GenericMessage<String>("2"));
|
||||
store2.addMessagesToGroup("3", new GenericMessage<String>("3"));
|
||||
|
||||
MessageGroupStore store3 = this.getMessageGroupStore();
|
||||
Iterator<MessageGroup> iterator = store3.iterator();
|
||||
@@ -392,7 +392,7 @@ public abstract class AbstractMongoDbMessageGroupStoreTests extends MongoDbAvail
|
||||
}
|
||||
assertEquals(3, counter);
|
||||
|
||||
store2.removeMessagesFromGroup(1, message);
|
||||
store2.removeMessagesFromGroup("1", message);
|
||||
|
||||
iterator = store3.iterator();
|
||||
counter = 0;
|
||||
|
||||
@@ -22,13 +22,14 @@ import static org.junit.Assert.assertThat;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import org.bson.Document;
|
||||
import org.hamcrest.Matchers;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
import org.springframework.context.support.GenericApplicationContext;
|
||||
import org.springframework.core.convert.converter.Converter;
|
||||
import org.springframework.data.convert.ReadingConverter;
|
||||
import org.springframework.data.mongodb.MongoDbFactory;
|
||||
import org.springframework.data.mongodb.core.SimpleMongoDbFactory;
|
||||
import org.springframework.integration.IntegrationMessageHeaderAccessor;
|
||||
@@ -43,7 +44,6 @@ import org.springframework.messaging.Message;
|
||||
import org.springframework.messaging.MessageChannel;
|
||||
import org.springframework.util.StopWatch;
|
||||
|
||||
import com.mongodb.DBObject;
|
||||
import com.mongodb.MongoClient;
|
||||
|
||||
/**
|
||||
@@ -198,12 +198,15 @@ public class ConfigurableMongoDbMessageGroupStoreTests extends AbstractMongoDbMe
|
||||
|
||||
}
|
||||
|
||||
public static class MessageReadConverter implements Converter<DBObject, Message<?>> {
|
||||
@ReadingConverter
|
||||
public static class MessageReadConverter implements Converter<Document, Message<?>> {
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public Message<?> convert(DBObject source) {
|
||||
return MessageBuilder.withPayload(source.get("payload")).copyHeaders((Map<String, ?>) source.get("headers")).build();
|
||||
public Message<?> convert(Document source) {
|
||||
return MessageBuilder.withPayload(source.get("payload"))
|
||||
.copyHeaders((Map<String, ?>) source.get("headers"))
|
||||
.build();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
<beans:bean id="mongoConnectionFactory" class="org.springframework.data.mongodb.core.SimpleMongoDbFactory">
|
||||
<beans:constructor-arg>
|
||||
<beans:bean class="com.mongodb.Mongo"/>
|
||||
<beans:bean class="com.mongodb.MongoClient"/>
|
||||
</beans:constructor-arg>
|
||||
<beans:constructor-arg value="test"/>
|
||||
</beans:bean>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
<beans:bean id="mongoConnectionFactory" class="org.springframework.data.mongodb.core.SimpleMongoDbFactory">
|
||||
<beans:constructor-arg>
|
||||
<beans:bean class="com.mongodb.Mongo"/>
|
||||
<beans:bean class="com.mongodb.MongoClient"/>
|
||||
</beans:constructor-arg>
|
||||
<beans:constructor-arg value="test"/>
|
||||
</beans:bean>
|
||||
|
||||
@@ -21,7 +21,6 @@ import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertNotSame;
|
||||
import static org.junit.Assert.assertThat;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
@@ -29,7 +28,6 @@ import java.util.concurrent.TimeUnit;
|
||||
import org.hamcrest.Matchers;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.context.support.AbstractApplicationContext;
|
||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
import org.springframework.integration.context.IntegrationContextUtils;
|
||||
@@ -88,16 +86,6 @@ public class DelayerHandlerRescheduleIntegrationTests extends MongoDbAvailableTe
|
||||
(ThreadPoolTaskScheduler) IntegrationContextUtils.getTaskScheduler(context);
|
||||
taskScheduler.shutdown();
|
||||
taskScheduler.getScheduledExecutor().awaitTermination(10, TimeUnit.SECONDS);
|
||||
context.destroy();
|
||||
|
||||
try {
|
||||
context.getBean("input", MessageChannel.class);
|
||||
fail("IllegalStateException expected");
|
||||
}
|
||||
catch (Exception e) {
|
||||
assertTrue(e instanceof IllegalStateException);
|
||||
assertTrue(e.getMessage().contains("BeanFactory not initialized or already closed - call 'refresh'"));
|
||||
}
|
||||
|
||||
assertEquals(2, messageStore.messageGroupSize(delayerMessageGroupId));
|
||||
|
||||
@@ -115,6 +103,8 @@ public class DelayerHandlerRescheduleIntegrationTests extends MongoDbAvailableTe
|
||||
.getOriginal();
|
||||
assertThat(message1, Matchers.anyOf(Matchers.is(original1), Matchers.is(original2)));
|
||||
|
||||
context.destroy();
|
||||
|
||||
context.refresh();
|
||||
|
||||
PollableChannel output = context.getBean("output", PollableChannel.class);
|
||||
@@ -129,6 +119,8 @@ public class DelayerHandlerRescheduleIntegrationTests extends MongoDbAvailableTe
|
||||
Object payload2 = message.getPayload();
|
||||
assertNotSame(payload1, payload2);
|
||||
|
||||
messageStore = context.getBean("messageStore", MessageGroupStore.class);
|
||||
|
||||
assertEquals(0, messageStore.messageGroupSize(delayerMessageGroupId));
|
||||
context.destroy();
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
<bean id="mongoConnectionFactory" class="org.springframework.data.mongodb.core.SimpleMongoDbFactory">
|
||||
<constructor-arg>
|
||||
<bean class="com.mongodb.Mongo"/>
|
||||
<bean class="com.mongodb.MongoClient"/>
|
||||
</constructor-arg>
|
||||
<constructor-arg value="test"/>
|
||||
</bean>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
<bean id="mongoConnectionFactory" class="org.springframework.data.mongodb.core.SimpleMongoDbFactory">
|
||||
<constructor-arg>
|
||||
<bean class="com.mongodb.Mongo"/>
|
||||
<bean class="com.mongodb.MongoClient"/>
|
||||
</constructor-arg>
|
||||
<constructor-arg value="test"/>
|
||||
</bean>
|
||||
|
||||
Reference in New Issue
Block a user