1

I am currently developing a framework which is supposed to connect to MongoDB. I would like to choose Spring-Data-MongoDB to handle database. But after I saw the sample code in its Github page spring-projects/spring-data-mongodb , I realized Spring Data might not be able to work without Spring Boot/MVC. Am I right? Is there any way that I can use Spring Data individually? I am not developing a server, so I don't need the whole Spring framework.

Thanks in advance!

jny
  • 8,007
  • 3
  • 37
  • 56
Eric Zhang
  • 164
  • 11

1 Answers1

1

It seems you are confusing some terms. Spring is general application framework. MVC is just an extension of the core, which isn't mandatory in every Spring application.

You only need the core of the Spring framework, which is a dependency of other modules, in your case spring-data-mongodb. Although Spring is most widely used in web development, it can be used in any JVM application.

Spring Boot isn't dedicated only to web development as well and it can help you to setup some common configurations (including MongoDB).

Daniel Olszewski
  • 13,995
  • 6
  • 58
  • 65