Before the first contact with Springmvc himself wrote a SPRINGMVC small project to familiarize yourself with SPRINGMVC, no database. The package is downloaded directly from the Internet. This time, I have a lot of problems in the middle of adding a package. Make a record, the next time you encounter no need to find information.
1: I use MAVEN to add a package, I thought this can avoid the collision, and version conflict, the result is I was too naïve, encountered version of the conflict.
Now the Pom.xml is as follows
<project xmlns= "http://maven.apache.org/POM/4.0.0" xmlns:xsi= "Http://www.w3.org/2001/XMLSchema-instance" xsi: schemalocation= "http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" > < Modelversion>4.0.0</modelversion> <groupId>PosMarkeSys</groupId> <artifactId> Posmarkesys</artifactid> <version>0.0.1-SNAPSHOT</version> <packaging>war</packaging > <name/> <description/> <properties> <project.build.sourceencoding>utf-8</project .build.sourceencoding> </properties> <dependencies> <!--SPRINGMVC related rack--> <dependency
> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> <version>3.0.1.RELEASE</version> </dependency> <dependency> <groupid>org.sprin Gframework</groupid> <ARTIFACTID>SPRING-AOP</ARTIFACtid> <version>3.0.1.RELEASE</version> </dependency> <dependency> <groupid& Gt;org.springframework</groupid> <artifactId>spring-aspects</artifactId> <version>3.0.1. release</version> </dependency> <dependency> <groupid>org.springframework</groupid > <artifactId>spring-beans</artifactId> <version>3.0.1.RELEASE</version> </DEP endency> <dependency> <groupId>org.springframework</groupId> <artifactid>spring-c ontext-support</artifactid> <version>3.0.1.RELEASE</version> </dependency> <depend
Ency> <groupId>org.springframework</groupId> <artifactId>spring-core</artifactId> <version>3.0.1.RELEASE</version> </dependency> <dependency> <groupid>org.spri ngframework</groupid&Gt
<artifactId>spring-tx</artifactId> <version>3.0.1.RELEASE</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactid>spring-jdbc</artif actid> <version>3.0.1.RELEASE</version> </dependency> <dependency> <groupi D>org.springframework</groupid> <artifactId>spring-web</artifactId> <version>3.0.1.re lease</version> </dependency> <dependency> <GROUPID>ORG.SPRINGFRAMEWORK</GROUPID&G
T <artifactId>spring-webmvc</artifactId> <version>3.0.1.RELEASE</version> </dependency&
Gt <!--connection pool--> <dependency> <groupId>commons-dbcp</groupId> <artifactid>commons- dbcp</artifactid> <version>1.4</version> </dependency> <dependency> <grOupid>commons-pool</groupid> <artifactId>commons-pool</artifactId> <version>1.6</v Ersion> </dependency> <!--hibernate related rack--> <dependency> <groupid>commons-c Ollections</groupid> <artifactId>commons-collections</artifactId> <version>2.1.1</ver sion> </dependency> <dependency> <groupId>commons-logging</groupId> <artif actid>commons-logging</artifactid> <version>1.2</version> </dependency> <depend ency> <groupId>hibernate</groupId> <artifactId>hibernate</artifactId> <versio n>3.1rc2</version> </dependency> <dependency> <groupId>jta</groupId> &L t;artifactid>jta</artifactid> <version>1.0.1b</version> </dependency> <dependen Cy> <groupid≫mysql</groupid> <artifactId>mysql-connector-java</artifactId> <version>5.1.37</ver
sion> </dependency> <dependency> <groupId>com.cloudhopper.proxool</groupId>
<artifactId>proxool</artifactId> <version>0.9.1</version> </dependency> <dependency> <groupId>com.cloudhopper.proxool</groupId> <artifactId>proxool-cglib< /artifactid> <version>0.9.1</version> </dependency> <dependency> <groupid& Gt;hibernate</groupid> <artifactId>hibernate-entitymanager</artifactId> <VERSION>3.4.0.G a</version> <type>pom</type> </dependency> <dependency> <groupid>com Mons-lang</groupid> <artifactId>commons-lang</artifactId> <version>20030203.000129</v Ersion> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactid>spring-or
m</artifactid> <version>3.0.1.RELEASE</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-oxm</artifactId> <version& gt;3.0.1.release</version> </dependency> <dependency> <groupid>org.springframework< ;/groupid> <artifactId>spring-hibernate3</artifactId> <version>2.0.8</version> &L t;/dependency> <dependency> <groupId>org.springframework</groupId> <ARTIFACTID>SP ring-expression</artifactid> <version>3.0.1.RELEASE</version> </dependency> <depen
Dency> <groupId>org.springframework</groupId> <artifactId>spring-test</artifactId> <version>3.0.1.release</version> </dependency> <dependency> <groupId>asm</groupId> <artifactId>asm</artifactId> <version>3.3.1</version> </dependency> <depende Ncy> <groupId>asm</groupId> <artifactId>asm-attrs</artifactId> <version>2. 2.3</version> </dependency> <dependency> <groupId>cglib</groupId> <arti
factid>cglib</artifactid> <version>2.2</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-nop</artifactId> <version>1.6. 4</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <ar tifactid>slf4j-api</artifactid> <version>1.6.4</version> </dependency> <depende Ncy> <groupid>org.slf4j</groupId> <artifactId>slf4j-log4j12</artifactId> <version>1.6.4</versio n> </dependency> </dependencies> <build> <plugins> <plugin> ;artifactid>maven-war-plugin</artifactid> </plugin> <plugin> <artifactid>ma
Ven-compiler-plugin</artifactid> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin> </plugins> </build>
; </project>
There was a hibernate-core this package, and then always reported an ASM version of the conflict, Then I buith-path found the ASM version is 5.0.3 version, but I introduced the package is 3.3.1 Ah, and then looked at the next hibernate-core included those racks, found but included ASM rack package, delete on it. See how the racks introduced in Maven contain the package view:
2. A second problem occurs after the deletion
ASM version and Cglib version conflict, after the data found
The cglib2.1.3 and asm3.3.1 versions are incompatible, and then the Cglib version is modified. Maven modified version But you do not know what version of the time. You can choose as follows
The right arrow points open after the version number, you can select the version, generally you are searching for the latest version.
3. The resource file was not found when it was published, but it does have a corresponding resource file in the project. This is after you have to clean the project first and then pom.xml the project maven and then insteal under Maven.
The entire project directory is as follows:
The entire system is in the following link:
Springmvc-hibernate