1. Unified Version Management
To achieve unified management of the jar version, you must set the jar version, that is, <version> </version>. The configuration is as follows:
<dependencies>.................<dependency><groupId>org.apache.shiro</groupId><artifactId>shiro-all</artifactId><version>${org.apache.shiro.version}</version></dependency><dependency><groupId>org.hibernate</groupId><artifactId>hibernate</artifactId><version>${org.hibernate.version}</version></dependency><dependency><groupId>org.hibernate</groupId><artifactId>hibernate-core</artifactId><version>${org.hibernate.version}</version></dependency><dependency><groupId>org.hibernate</groupId><artifactId>hibernate-ehcache</artifactId><version>${org.hibernate.version}</version></dependency><dependency><groupId>org.hibernate</groupId><artifactId>hibernate-annotations</artifactId><version>3.4.0.GA</version></dependency><dependency><groupId>org.hibernate</groupId><artifactId>hibernate-c3p0</artifactId><version>${org.hibernate.version}</version></dependency><dependency><groupId>org.hibernate</groupId><artifactId>hibernate-entitymanager</artifactId><version>${org.hibernate.version}</version></dependency><dependency><groupId>org.springframework</groupId><artifactId>spring-core</artifactId><version>${org.springframework.version}</version></dependency>........................</dependencies>
2. Set version attributes
1. <version> </version> is configured with $ {*. version} configuration, so the configuration does not find the specific version, so it must be in the Pom. use attributes in XML to define the exact values of these versions. The configuration is as follows:
<! -- Configure the variable version (hibernate, spring, Shiro) --> <Properties> <javax. servlet. version> 3.1.0 </javax. servlet. version> <Org. apache. shiro. version> 1.2.3 </org. apache. shiro. version> <Org. hibernate. version> 3.6.10.final </org. hibernate. version> <Org. springframework. version> 3.0.2.release </org. springframework. version> <developer. organization> <! [CDATA [scengine]> </developer. Organization> </Properties>
Note: The key must be consistent with the referenced key.