Maven mainly depends on the version definition of the library (to solve the problem of multiple projects relying on different versions of the same jar)

Description of the problem:

The web project depends on multiple projects, and the spring versions that multiple projects depend on are inconsistent. When the eclpise deployment web project starts, the jars in the released lib are related to the spring 3.0 version, so when starting The error cannot find the cache XML namespace. In fact, this cache is only included in spring version 3.1 and above.

Therefore, when the pom file is dependent, the dependency definition of the spring version should be defined as follows:
    <properties>
        <!-- The version definition of the main dependency library-->
        <spring.version>3.2.2.RELEASE</spring.version>
        < maven.test.skip>true</maven.test.skip>
    </properties>

When this annotation is added, when it is loaded into the lib directory of the web project, the version of the spring-related jar is 3.2.2.RELEASE.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326599506&siteId=291194637