Access NO-SQL Mongo DB with Java
Last updated: 2025-09-14
Steps:
-
Create Maven project with the following pom.xml:
Unresolved include directive in modules/6.x.x/pages/frameworks/jk-framework/jk-framework-data/java-simple-nosql-mongo-tutorial.adoc - include::inc/mongo/pom.xml[]
If you are using Eclipse, be sure to refresh your project (select your project→ right click→ Maven→ Update Project) |
-
Create config file at src/main/resources/config.properties with the following contents:
Unresolved include directive in modules/6.x.x/pages/frameworks/jk-framework/jk-framework-data/java-simple-nosql-mongo-tutorial.adoc - include::inc/mongo/src/main/resources/config.properties[]
-
Create Model Account with the following contents:
Unresolved include directive in modules/6.x.x/pages/frameworks/jk-framework/jk-framework-data/java-simple-nosql-mongo-tutorial.adoc - include::inc/mongo/src/main/java/com/app/Account.java[]
-
Create Main class with the following contents:
Unresolved include directive in modules/6.x.x/pages/frameworks/jk-framework/jk-framework-data/java-simple-nosql-mongo-tutorial.adoc - include::inc/mongo/src/main/java/com/app/App.java[]
Thats it, now run your App class.

Full example source-code can be found at https://github.com/smartapi-com/j-framework-data-nosql-mongo |