针对上给出的dwz_springmvc 例子使用maven进行管理jar包。因为当前项目只用到了lib中部分jar包,所以maven只管理了这一部分起作用的。以下为pom.xml
4.0.0 com.htzy dwz_springmvc war 1.0-SNAPSHOT dwz_springmvc Maven Webapp http://maven.apache.org javax.annotation javax.annotation-api 1.2 javax.ejb ejb-api 3.0 javax.persistence persistence-api 1.0.2 javax.resource connector-api 1.5 javax.servlet servlet-api 2.5 javax.servlet.jsp jsp-api 2.2 javax.transaction jta 1.1 aopalliance aopalliance 1.0 asm asm 3.3.1 org.aspectj aspectjweaver 1.6.12 cglib cglib 2.2.2 commons-beanutils commons-beanutils 1.8.0 commons-codec commons-codec 1.4 commons-collections commons-collections 3.2 commons-configuration commons-configuration 1.6 commons-dbcp commons-dbcp 1.2 org.apache.commons commons-email 1.2 commons-fileupload commons-fileupload 1.2.2 commons-io commons-io 2.1 commons-lang commons-lang 2.4 commons-pool commons-pool 1.2 dom4j dom4j 1.6.1 org.freemarker freemarker 2.3.19 org.apache.geronimo.specs geronimo-jms_1.1_spec 1.1.1 org.codehaus.jackson jackson-core-lgpl 1.6.6 org.codehaus.jackson jackson-mapper-lgpl 1.6.6 javabase64 javabase64 1.3.1 system ${basedir}/src/main/webapp/WEB-INF/lib/javabase64-1.3.1.jar com.mortennobel java-image-scaling 0.8.5 org.slf4j jcl-over-slf4j 1.6.1 jstl jstl 1.2 log4j log4j 1.2.17 org.mybatis mybatis 3.0.4 org.mybatis mybatis-spring 1.0.0 mysql mysql-connector-java 5.1.16 org.osgi org.osgi.core 4.1.0 org.springframework spring-aop 3.1.2.RELEASE org.springframework spring-asm 3.1.2.RELEASE org.springframework spring-beans 3.1.2.RELEASE org.springframework spring-context-support 3.1.2.RELEASE org.springframework spring-context 3.1.2.RELEASE org.springframework spring-core 3.1.2.RELEASE org.springframework spring-expression 3.1.2.RELEASE org.springframework spring-jdbc 3.1.2.RELEASE org.springframework spring-test 3.1.2.RELEASE org.springframework spring-tx 3.1.2.RELEASE org.springframework spring-web 3.1.2.RELEASE org.springframework spring-webmvc 3.1.2.RELEASE quartz quartz 1.5.2 opensymphony sitemesh 2.4.2 org.slf4j slf4j-api 1.6.1 org.slf4j slf4j-log4j12 1.6.1 taglibs standard 1.1.2 org.apache.zookeeper zookeeper 3.4.5 net.sourceforge.jexcelapi jxl 2.6.12 junit junit 3.8.1 test dwz_springmvc org.apache.tomcat.maven tomcat7-maven-plugin 2.1 8080 / org.apache.maven.plugins maven-compiler-plugin
完整代码托管地址: 只需要下载第一个版本就好。。
启动方式mvn tomcat7:run-war 如果报错的话,在pom中加上
org.apache.maven.plugins maven-compiler-plugin
也可以使用apache-tomcat-8.0.28-windows-x86 ,进入控制台,catalina.bat run即可。