constructor
Şöyle yaparız. com.mongodb.MongoClient nesnesi alır
Şöyle yaparız. com.mongodb.MongoClient nesnesi alır
@Configuration
public class AppMongoConfig {
  public @Bean
  MongoDbFactory mongoDbFactory() throws Exception {
    return new SimpleMongoDbFactory(new MongoClient(), "databasename");
  }
} 
Hiç yorum yok:
Yorum Gönder