A, cause

  • Introducing coordinates will load more than one JAR package, resulting in dependency passing and dependency conflicts

Second, the phenomenon of

1. Introduce the Spring-Context package

2. Introduce the SpringMVC package

  • Both MVC and Context depend on sprng-core, which depends on version 5.0.8, and one on version 4.2.4.

Rule of three,

  • In the above scenario, core version 5.0 will be automatically introduced. What if we need core version 4.2

1. Priority principle

  • Release 4.2.4, live 5.0.8, because of the priority, so the introduction of the core package is 4.2.4

2. Direct reliance

  • To introduce a core dependency separately, the 4.2.4 version will be used since the direct dependency has a higher priority than the passed dependency

3. Eliminate dependencies

  • Remove core dependencies from version 5.0 directly

reference

  • www.cnblogs.com/jichi/p/116… Appropriate summaries and modifications have been made