I am having problems in using Spring to access MongoDB with credentials. While without credentials it works like a charme, using them just fails saying
F
using this versions in your pom:
org.mongodb
mongo-java-driver
3.2.1
org.springframework.data
spring-data-mongodb
1.8.2.RELEASE
And this configuration in spring:
classpath:log4j/log4j_test.properties
With this configuration you only have to inject the MongoTemplate:
@Autowired
@Qualifier("mongoTemplateID")
private MongoTemplate mongoTemplate;
This should work fine =)