• Post Reply Bookmark Topic Watch Topic
  • New Topic

whats the difference between maven and spring if both are used for dependency injection.  RSS feed

 
eugene malcolumn
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
whats the difference between maven and spring if both are used for dependency injection..
 
Daniel Cox
Ranch Hand
Posts: 231
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Spring is used for dependency injection. Maven is used to supply dependencies.
 
eugene malcolumn
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
maven automatically downloads from internet...doesnt it injects that into project??
 
Dave Tolls
Ranch Foreman
Posts: 3068
37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dependency injection (Spring) is about injecting dependencies into an instance of a class.
Dependency management (Maven) is about retrieving the right library dependencies (other project jar files, including their own dependencies) for your project as a whole.
 
Stephan van Hulst
Saloon Keeper
Posts: 7993
143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
They are unrelated. The dependency in "dependency injection" refers to passing objects to other objects at the correct time. Maven dependencies refer to libraries that your application depends on.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!