Merhaba Arkadaşlar ,
Henüz MongoDb hakkında bilginiz yok ise ilk yazımı okumanızı tavsiye ederim
Nelere İhtiyacımız var ?
- Bir adet Eclipse
- Eclipse Maven Plugin’i (m2Eclipse tavsiyedir)
- Çalışmayı bekleyen bir MongoDB (İlk yazıdan faydalanabilrsiniz.)
Eclipse’den yeni bir maven projesi oluşturalım
File->New->Other (Maven Project)
pom.xml dosyasına gerekli olan mongodb kütüphanesini ekliyoruz. Örnek pom.xml şu şekilde olmalı.
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>mongo</groupId>
<artifactId>mongoproject</artifactId>
<version>0.0.1-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongo-java-driver</artifactId>
<version>2.11.3</version>
</dependency>
</dependencies>
</project>