

Here are a list of all the dependencies we used in the project: For this, we used the dependencies we mentioned in Spring MVC section along with some Servlet Container dependencies.

Just as a simple demonstration for Spring MVC, we will show how a simple controller can be made with Spring MVC 5. When we look at the dependency tree for this library, we will observe that JDBC and Transaction support is also included in this dependency: Now, let’s look at the core dependencies which are needed for Spring Persistence implementations: This is because this JAR is only needed at runtime to provide Spring related classes only and not used in the project directly, at least not used for simple projects. The method of sub-branched representation of an indirect dependency clears out when some dependency brings another dependency into the dependency pool of the build system.įinally, spring-context dependency we added here is runtime scope.

Note that if one of the dependency needed another dependency to run, it was also downloaded and was shown as a sub-branch of the tree in the dependency tree above. When we ran the command above, before presenting to us the Dependency Tree, maven first downloaded the JARs again to confirm if something has changed. The spring-context library bring the actual Spring Injection Container into the project and needs few more JARs like spring-aop, spring-beans, spring-core, spring-expression and spring-jcl. When we run this command, it will show us the following Dependency Tree: Here is the Maven command which we can use to achieve the same:Ĭheck Dependency Tree mvn dependency:tree To understand all the dependencies which are added to the project when we add a specific dependency, we can run a simple Maven command which allows us to see a complete Dependency Tree for the project.

Again, the latest versions of all the libraries we use can be found on the Maven Central. Note that we have used the latest available Spring version which was released at the time this post was published. To add the Spring Context support, here is the dependency which is needed: Due to this, we will cover each of the dependencies in their own, separate sections. For instance, the Spring Context dependency doesn’t need any Spring MVC dependency or Spring Data libraries. Due to a highly modular nature of Spring Framework, adding one dependency doesn’t create a requirement for another dependency.
