🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
在这里整合一下,使用Maven构建一个SSH项目 ### 1.新建一个Web项目 可以参照前面的博客 ### 2.添加依赖,修改pom.xml ~~~ <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/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.deppon.demo</groupId> <artifactId>test06</artifactId> <packaging>war</packaging> <version>0.0.1-SNAPSHOT</version> <name>test06 Maven Webapp</name> <url>http://maven.apache.org</url> <!-- 属性配置 --> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.10</version> <scope>test</scope> </dependency> <!-- 添加SSH依赖 --> <!-- Struts2 --> <dependency> <groupId>org.apache.struts</groupId> <artifactId>struts2-core</artifactId> <version>2.3.1</version> </dependency> <dependency> <groupId>org.apache.struts</groupId> <artifactId>struts2-spring-plugin</artifactId> <version>2.3.1</version> </dependency> <!-- 添加Hibernate依赖 --> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-core</artifactId> <version>3.6.5.Final</version> </dependency> <dependency> <groupId>commons-dbcp</groupId> <artifactId>commons-dbcp</artifactId> <version>1.4</version> </dependency> <!-- 添加Log4J依赖 --> <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2.16</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>1.6.1</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-nop</artifactId> <version>1.6.4</version> </dependency> <!-- 添加javassist --> <dependency> <groupId>javassist</groupId> <artifactId>javassist</artifactId> <version>3.11.0.GA</version> </dependency> <!-- 添加Spring依赖 --> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-core</artifactId> <version>3.1.1.RELEASE</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-beans</artifactId> <version>3.1.1.RELEASE</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> <version>3.1.1.RELEASE</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-jdbc</artifactId> <version>3.1.1.RELEASE</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-orm</artifactId> <version>3.1.1.RELEASE</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-web</artifactId> <version>3.1.1.RELEASE</version> </dependency> </dependencies> <build> <finalName>test06</finalName> </build> </project> ~~~ 3.各种配置文件,各种代码 这里的话,就不贴代码了,和使用MyEclipse开发Web项目是一样的,在后一篇博客中也提到了,其实,之前的好多博客都是一样的原理,都是修改依赖配置,其他没什么, 相关的项目应该就到这里了,以后的话,会根据一些资料系统的学习一下maven,整理出更好的博客来![大笑](https://box.kancloud.cn/2016-01-19_569e21abc5518.gif) 。 使用Maven构建SSH项目源码:[http://download.csdn.net/detail/jolingogo/5274494](http://download.csdn.net/detail/jolingogo/5274494) --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - [Maven学习(一)- 环境搭建](http://blog.csdn.net/jolingogo/article/details/8775046) - [Maven学习(二)- 安装m2eclipse插件 ](http://blog.csdn.net/jolingogo/article/details/8796410) - [Maven学习(三)- 使用Maven构建Web项目](http://blog.csdn.net/jolingogo/article/details/8796726) - [Maven学习(四)- 使用Maven构建Web项目-测试](http://blog.csdn.net/jolingogo/article/details/8797153) - [Maven学习(五)- 使用Maven构建Struts2项目](http://blog.csdn.net/jolingogo/article/details/8798052) - [Maven学习(六)- 构建Hibernate项目](http://blog.csdn.net/jolingogo/article/details/8798684) - [Maven学习(七)- 构建Spring项目](http://blog.csdn.net/jolingogo/article/details/8799307) - [Maven学习(八)- 构建MyBatis项目](http://blog.csdn.net/jolingogo/article/details/8801158) - [Maven学习(九)- 构建SSH项目](http://blog.csdn.net/jolingogo/article/details/8811817) - [Maven学习(十) - 阶段小结 ](http://blog.csdn.net/jolingogo/article/details/8821375) - [专栏:Maven学习之旅](http://blog.csdn.net/column/details/yuguiyang-maven.html)