Spring.data.mongodb.host Replica Set
must get rid of the following property
spring.data.mongodb.host=server1
spring.data.mongodb.port=27017
spring.data.mongodb.authentication-database=system
spring.data.mongodb.database=database
then use
spring.data.mongodb.uri=mongodb://username:password@server1:port,server2:port/database
Lazy Lemur