在这里整合一下,使用Maven构建一个SSH项目

1.新建一个Web项目

可以参照前面的博客

2.添加依赖,修改pom.xml

  1. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  2. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  3. <modelVersion>4.0.0</modelVersion>
  4. <groupId>com.deppon.demo</groupId>
  5. <artifactId>test06</artifactId>
  6. <packaging>war</packaging>
  7. <version>0.0.1-SNAPSHOT</version>
  8. <name>test06 Maven Webapp</name>
  9. <url>http://maven.apache.org</url>
  10. <!-- 属性配置 -->
  11. <properties>
  12. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  13. </properties>
  14. <dependencies>
  15. <dependency>
  16. <groupId>junit</groupId>
  17. <artifactId>junit</artifactId>
  18. <version>4.10</version>
  19. <scope>test</scope>
  20. </dependency>
  21. <!-- 添加SSH依赖 -->
  22. <!-- Struts2 -->
  23. <dependency>
  24. <groupId>org.apache.struts</groupId>
  25. <artifactId>struts2-core</artifactId>
  26. <version>2.3.1</version>
  27. </dependency>
  28. <dependency>
  29. <groupId>org.apache.struts</groupId>
  30. <artifactId>struts2-spring-plugin</artifactId>
  31. <version>2.3.1</version>
  32. </dependency>
  33. <!-- 添加Hibernate依赖 -->
  34. <dependency>
  35. <groupId>org.hibernate</groupId>
  36. <artifactId>hibernate-core</artifactId>
  37. <version>3.6.5.Final</version>
  38. </dependency>
  39. <dependency>
  40. <groupId>commons-dbcp</groupId>
  41. <artifactId>commons-dbcp</artifactId>
  42. <version>1.4</version>
  43. </dependency>
  44. <!-- 添加Log4J依赖 -->
  45. <dependency>
  46. <groupId>log4j</groupId>
  47. <artifactId>log4j</artifactId>
  48. <version>1.2.16</version>
  49. </dependency>
  50. <dependency>
  51. <groupId>org.slf4j</groupId>
  52. <artifactId>slf4j-api</artifactId>
  53. <version>1.6.1</version>
  54. </dependency>
  55. <dependency>
  56. <groupId>org.slf4j</groupId>
  57. <artifactId>slf4j-nop</artifactId>
  58. <version>1.6.4</version>
  59. </dependency>
  60. <!-- 添加javassist -->
  61. <dependency>
  62. <groupId>javassist</groupId>
  63. <artifactId>javassist</artifactId>
  64. <version>3.11.0.GA</version>
  65. </dependency>
  66. <!-- 添加Spring依赖 -->
  67. <dependency>
  68. <groupId>org.springframework</groupId>
  69. <artifactId>spring-core</artifactId>
  70. <version>3.1.1.RELEASE</version>
  71. </dependency>
  72. <dependency>
  73. <groupId>org.springframework</groupId>
  74. <artifactId>spring-beans</artifactId>
  75. <version>3.1.1.RELEASE</version>
  76. </dependency>
  77. <dependency>
  78. <groupId>org.springframework</groupId>
  79. <artifactId>spring-context</artifactId>
  80. <version>3.1.1.RELEASE</version>
  81. </dependency>
  82. <dependency>
  83. <groupId>org.springframework</groupId>
  84. <artifactId>spring-jdbc</artifactId>
  85. <version>3.1.1.RELEASE</version>
  86. </dependency>
  87. <dependency>
  88. <groupId>org.springframework</groupId>
  89. <artifactId>spring-orm</artifactId>
  90. <version>3.1.1.RELEASE</version>
  91. </dependency>
  92. <dependency>
  93. <groupId>org.springframework</groupId>
  94. <artifactId>spring-web</artifactId>
  95. <version>3.1.1.RELEASE</version>
  96. </dependency>
  97. </dependencies>
  98. <build>
  99. <finalName>test06</finalName>
  100. </build>
  101. </project>

3.各种配置文件,各种代码

这里的话,就不贴代码了,和使用MyEclipse开发Web项目是一样的,在后一篇博客中也提到了,其实,之前的好多博客都是一样的原理,都是修改依赖配置,其他没什么,

使用Maven构建SSH项目源码:http://download.csdn.net/detail/jolingogo/5274494

maven资料学习专栏:http://blog.csdn.net/column/details/yuguiyang-maven.html

Maven的学习资料收集--(九) 构建SSH项目以及专栏maven的更多相关文章

  1. Maven的学习资料收集--(八) 构建MyBatis项目

    在这里,写一下,怎么使用Maven构建MyBatis项目. 1. 新建一个Web项目 可以参考前面的博客 2. 修改pom.xml,添加MyBatis依赖 <project xmlns=&quo ...

  2. Maven的学习资料收集--(七) 构建Spring项目

    在这里,使用Maven构建一个Spring项目 构建单独项目的话,其实都差不多 1. 新建一个Web项目 参考之前的博客 2.修改 pom.xml,添加Spring依赖 <project xml ...

  3. Maven的学习资料收集--(十)Myeclipse下创建Maven的Web项目

    先要在MyEclipse中对Maven进行设置: 到此Maven对MyEclipse的支持设置完毕.   下面我们在MyEclipse中创建一个Maven标准的Web工程: New --> We ...

  4. Maven的学习资料收集--(五)使用Maven构建Struts2项目

    在前两篇博客中,使用Maven构建了Web项目,在这篇博客中写一下,怎样构建一个简单的Struts2项目. 在准备过程中发现,要使用好Maven,个人觉得要好好利用这两个网站: http://mvnr ...

  5. Maven的学习资料收集--(三)使用Maven构建Web项目

    新建Maven项目 File - New - Other 选择Maven Project 单击Next 保持默认即可单击Next 选择Archetype为 web app单击Next 输入一些必要信息 ...

  6. Maven的学习资料收集--(六) 构建Hibernate项目

    前面我们使用Maven构建了Struts2项目,这里我们来试一下Hibernate项目: 这里的例子,大体框架应该是正确的,但是,对于Maven的很多约定都没有掌握,估计包的命名都不是非常好,等以后, ...

  7. Maven的学习资料收集--(四)使用Maven构建Web项目-测试

    2014-08-04 23:21 2人阅读 评论(0) 收藏 编辑 删除   目录(?)[+]   [-] 在srcmainjava下新建一个Servlet 修改webxml 新建JSP 测试   在 ...

  8. Maven的学习资料收集--(一)环境搭建

    这几天在做项目的时候用到了maven,但是自己没有从来没有接触过,所以咋网上找资料,终于找到了一下的资料,这个是别人总结的,我只是转载过来积累.请尊重原创. 官网地址:http://maven.apa ...

  9. Maven的学习资料收集--(二)安装m2eclipse插件

    在Eclipse中可以安装Maven插件,可以更方便的使用: 官网地址:http://www.eclipse.org/m2e/ 可以在线安装或者离线下载,之前在线安装总是失败,可能是网速的原因,找到了 ...

随机推荐

  1. FATFS 文件系统

    转载请注明出处:http://blog.csdn.net/qq_26093511/article/details/51706228 1.文件系统是什么? 负责管理和存储文件信息的软件机构称为文件管理系 ...

  2. ES6学习之Proxy

    定义:“代理器”,用于修改某些操作的默认行为,等同于在语言层面做出修改,所以属于一种“元编程”(meta programming),即对编程语言进行编程.可以对外界的访问进行过滤和改写. 语法: va ...

  3. Android Studio配置使用git

    一.准备 如果没有安装git,那么先要到到Git官网下载git,然后按照提示一步一步安装即可,这个没有什么难度,不过要记得安装的目录. 二.Android Studio配置git File->S ...

  4. JavaScript中设置cookie的值

    cookie 与 session 是网页开发中常用的信息存储方式.Cookie是在客户端开辟的一块可存储用户信息的地方:Session是在服务器内存中开辟的一块存储用户信息的地方.JavaScript ...

  5. Fast Walsh–Hadamard transform

    考虑变换 $$\hat{A_x} = \sum_{i\ or\ x = x}{ A_i }$$ 记 $S_{t}(A,x) = \sum_{c(i,t)\ or\ c(x,t)=c(x,t),\ i ...

  6. iOS开发,使用CocoaSSDP查找设备时按关键字过滤Device

    关于CocoaSSDP的资料有很多,这里就不介绍了. 希望寻找的目标设备,在header中设置了自定义的keyword,虽然通过外围代码也能达到相同目的,但是直接修改CocoaSSDP源码更简便. 导 ...

  7. Linux下查看CPU使用率 --- top命令的使用

    在系统维护的过程中,随时可能有需要查看 CPU 使用率,并根据相应信息分析系统状况的需要.在 CentOS 中,可以通过 top 命令来查看 CPU 使用状况.运行 top 命令后,CPU 使用状态会 ...

  8. 除了BAT,计算机、软件专业的毕业生还有别的好去处吗?

    "学技术的同学应该关注36氪.pingwest,极客公园这些圈子里很有影响力的科技媒体" 转载--除了BAT,计算机.软件专业的毕业生还有别的好去处吗? 又到校招季,985理工科的 ...

  9. HTMLParser使用详解(2)- Node内容

    HTMLParser使用详解(2)- Node内容  2010-03-18 13:41 HTMLParser将解析过的信息留存为一个树的结构.Node是信息留存的数据类型基础.请看Node的界说:pu ...

  10. SpringBoot应用篇(一):自定义starter

    一.码前必备知识 1.SpringBoot starter机制 SpringBoot中的starter是一种非常重要的机制,能够抛弃以前繁杂的配置,将其统一集成进starter,应用者只需要在mave ...