Package org.mongodb

Examples of org.mongodb.MongoClientURI


  }

  @Bean
  public MongoClient mongoClient() throws UnknownHostException {
    String credentials = StringUtils.isEmpty(this.mongoUser) ? "" : this.mongoUser + ":" + this.mongoPassword + "@";
    return MongoClients.create(new MongoClientURI("mongodb://" + credentials + this.mongoHost + ":" + this.mongoPort + "/" + this.mongoDatabase), MongoClientOptions.builder().build());
  }
View Full Code Here

TOP

Related Classes of org.mongodb.MongoClientURI

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.