使用maven管理jar包的依赖

< 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. </ modelVersion >
< groupId > com.dabai </ groupId >
< artifactId > test-parent </ artifactId >
< version > 0.0.-SNAPSHOT </ version >
< 包装 > pom </ packaging >
< name > parent </ name >
< description >父</ description > < properties >
< spring .version> 4.2..RELEASE </ spring .version>
< hibernate .version> 5.0..Final </ hibernate .version>
< struts2 .version> 2.3. </ struts2 .version>
< slf4j .version> 1.6. </ slf4j .version>
< log4j .version> 1.2. </ log4j .version>
< shiro .version> 1.2. </ shiro .version>
</ properties > < dependencies >
< 依赖 >
< groupId > org.springframework </ groupId >
< artifactId > spring-context </ artifactId >
< version > $ {spring.version} </ version >
</ dependency > < 依赖 >
< groupId > org.springframework </ groupId >
< artifactId > spring-context-support </ artifactId >
< version > $ {spring.version} </ version >
</ dependency > < 依赖 >
< groupId > org.springframework </ groupId >
< artifactId > spring-web </ artifactId >
< version > $ {spring.version} </ version >
</ dependency > < 依赖 >
< groupId > org.springframework </ groupId >
< artifactId > spring-orm </ artifactId >
< version > $ {spring.version} </ version >
</ dependency > < 依赖 >
< groupId > org.springframework </ groupId >
< artifactId > spring-beans </ artifactId >
< version > $ {spring.version} </ version >
</ dependency > < 依赖 >
< groupId > org.springframework </ groupId >
< artifactId > spring-core </ artifactId >
< version > $ {spring.version} </ version >
</ dependency > < 依赖 >
< groupId > org.aspectj </ groupId >
< artifactId > aspectjweaver </ artifactId >
< version > 1.7. </ version >
</ dependency > <! - struts2开始- >
< 依赖 >
< groupId > org.apache.struts </ groupId >
< artifactId > struts2-core </ artifactId >
< version > $ {struts2.version} </ version >
<! -排除传递的依赖- >
< exclusions >
< 排除 >
< artifactId > javassist </ artifactId >
< groupId > javassist </ groupId >
</ exclusion >
</ exclusions >
</ dependency >
< 依赖 >
< groupId > org.apache.struts </ groupId >
< artifactId > struts2-spring-plugin </ artifactId >
< version > $ {struts2.version} </ version >
</ dependency >
< 依赖 >
< groupId > org.apache.struts </ groupId >
< artifactId > struts2-convention-plugin </ artifactId >
< version > $ {struts2.version} </ version >
</ dependency >
<! - struts2 end - > <! - hibernate begin - >
< 依赖 >
< groupId > org.hibernate </ groupId >
< artifactId > hibernate-core </ artifactId >
< version > $ {hibernate.version} </ version >
</ dependency >
<! - hibernate end - > <! - log start - >
< 依赖 >
< groupId > log4j </ groupId >
< artifactId > log4j </ artifactId >
< version > $ {log4j.version} </ version >
</ dependency > < 依赖 >
< groupId > org.slf4j </ groupId >
< artifactId > slf4j-api </ artifactId >
< version > $ {slf4j.version} </ version >
</ dependency > < 依赖 >
< groupId > org.slf4j </ groupId >
< artifactId > slf4j-log4j12 </ artifactId >
< version > $ {slf4j.version} </ version >
</ dependency >
<! - log end - > < 依赖 >
< groupId > org.apache.poi </ groupId >
< artifactId > poi </ artifactId >
< version > 3.11 </ version >
</ dependency > < 依赖 >
< groupId > org.apache.cxf </ groupId >
< artifactId > cxf-rt-frontend-jaxws </ artifactId >
< version > 3.0. </ version >
</ dependency >
< 依赖 >
< groupId > org.apache.cxf </ groupId >
< artifactId > cxf-rt-transports-http </ artifactId >
< version > 3.0. </ version >
</ dependency >
< 依赖 >
< groupId > junit </ groupId >
< artifactId > junit </ artifactId >
< version > 4.10 </ version >
< scope > test </ scope >
</ dependency > <! -加入的servlet和JSP的依赖- >
< 依赖 >
< groupId > javax.servlet </ groupId >
< artifactId > servlet-api </ artifactId >
< version > 2.5 </ version >
< scope >提供</ scope >
</ dependency >
< 依赖 >
< groupId > javax.servlet </ groupId >
< artifactId > jsp-api </ artifactId >
< version > 2.0 </ version >
< scope >提供</ scope >
</ dependency > <! -引入pinyin4J的依赖- >
< 依赖 >
< groupId > com.belerweb </ groupId >
< artifactId > pinyin4j </ artifactId >
< version > 2.5. </ version >
</ dependency > <! -引入JSON-lib中的依赖- >
< 依赖 >
< groupId > net.sf.json-lib </ groupId >
< artifactId > json-lib </ artifactId >
< version > 2.4 </ version >
</ dependency > <! -引入c3p0jar包- >
< 依赖 >
< groupId > c3p0 </ groupId >
< artifactId > c3p0 </ artifactId >
< version > 0.9.1.2 </ version >
</ dependency > <! -引入了Ehcache的依赖- >
< 依赖 >
< groupId > net.sf.ehcache </ groupId >
< artifactId > ehcache-core </ artifactId >
< version > 2.6. </ version >
</ dependency >
<! -引入四郎框架的依赖- >
< 依赖 >
< groupId > org.apache.shiro </ groupId >
< artifactId > shiro-all </ artifactId >
< version > 1.2. </ version >
</ dependency >
<! -引入MySQL的数据库驱动依赖- >
< 依赖 >
< groupId > mysql </ groupId >
< artifactId > mysql-connector-java </ artifactId >
< version > 5.1. </ version >
</ dependency >
</ dependencies >
< build >
<! -插件- >
< plugins >
< 插件 >
< groupId > org.apache.maven.plugins </ groupId >
< artifactId > maven-resources-plugin </ artifactId >
< version > 2.5 </ version >
</ plugin >
< 插件 >
< groupId > org.apache.maven.plugins </ groupId >
< artifactId > maven-compiler-plugin </ artifactId >
< version > 2.3. </ version >
< 配置 >
< source > 1.7 </ source >
< target > 1.7 </ target >
</ configuration >
</ plugin >
<! -引入Tomcat的插件- >
< 插件 >
< groupId > org.apache.tomcat.maven </ groupId >
< artifactId > tomcat7-maven-plugin </ artifactId >
< version > 2.2 </ version >
< 配置 >
< path > / bos </ path >
< port > </ port >
</ configuration >
</ plugin >
</ plugins >
< resources >
< 资源 >
< directory > src / main / java </ directory >
< includes >
< include > ** / *。properties </ include >
< include > ** / *。xml </ include >
</ includes >
< filtering > false </ filtering >
</ resource >
< 资源 >
< directory > src / main / resources </ directory >
< includes >
< include > ** / *。properties </ include >
< include > ** / *。xml </ include >
</ includes >
< filtering > false </ filtering >
</ resource >
</ resources >
</ build > < modules >
< module > test-entity </ module >
< module > test-web </ module >
< module > test-utils </ module >
< module > test-service </ module >
< module > test-dao </ module >
</ modules >
</ project

实体和实体对应的hibernate映射文件

dao层:从上往下是baseDao一个抽取类 ,dao层接口类  dao层实现类

全部代码:https://github.com/Danovercast/study.git

最下面那个是webservice服务调用  是另外一个

基于struts2、hibernate、spring、shiro、MySQL的项目开发的更多相关文章

  1. 基于Struts2+Hibernate的朋友圈留言网站开发的质量属性

    在课堂上我们了解了质量高于功能,质量属性是指影响质量的相关因素,是对质量的描述.现在我们对基于SSH的交友网站开发的质量属性可以从以下几个方向进行分析: (1)可用性: 当错误发生时,使用可用性战术进 ...

  2. Struts2+Hibernate+Spring 整合示例

    转自:https://blog.csdn.net/tkd03072010/article/details/7468769 Struts2+Hibernate+Spring 整合示例 Spring整合S ...

  3. struts2+hibernate+spring简单整合且java.sql.SQLException: No suitable driver 问题解决

    最近上j2ee的课,老师要求整合struts2+hibernate+spring,我自己其实早早地有准备弄的,现在都第9个项目了,无奈自己的思路和头绪把自己带坑了,当然也是经验问题,其实只是用myec ...

  4. 工作笔记3.手把手教你搭建SSH(struts2+hibernate+spring)环境

    上文中我们介绍<工作笔记2.软件开发经常使用工具> 从今天開始本文将教大家怎样进行开发?本文以搭建SSH(struts2+hibernate+spring)框架为例,共分为3步: 1)3个 ...

  5. 利用Intellij+MAVEN搭建Spring+Mybatis+MySql+SpringMVC项目详解

    http://blog.csdn.net/noaman_wgs/article/details/53893948 利用Intellij+MAVEN搭建Spring+Mybatis+MySql+Spri ...

  6. Hibernate入门2.简单的项目开发实例

    Hibernate入门2.简单的项目开发实例 这一节通过一个简单的项目学习Hibernate项目的配置 代码下载 : 链接: http://pan.baidu.com/s/1zlgjl 密码: p34 ...

  7. 【Hades】ades是一个开源库,基于JPA和Spring构建,通过减少开发工作量显著的改进了数据访问层的实现

    几乎每个应用系统都需要通过访问数据来完成工作.要想使用领域设计方法,你就需要为实体类定义和构建资源库来实现领域对象的持久化.目前开发人员经常使用JPA来实现持久化库.JPA让持久化变得非常容易,但是仍 ...

  8. 基于Vue、web3的以太坊项目开发及交易内幕初探 错误解决总结

    基于Vue.web3的以太坊项目开发及交易内幕初探 本文通过宏观和微观两个层面窥探以太坊底层执行逻辑. 宏观层面描述创建并运行一个小型带钱包的发币APP的过程,微观层面是顺藤摸瓜从http api深入 ...

  9. [置顶] struts2+hibernate+spring整合(annotation版)

    本博文使用struts2,hibernate,spring技术整合Web项目,同时分层封装代码,包含model层,DAO层,Service层,Action层. 在整合hibernate时使用annot ...

  10. springMVC用法 以及一个简单的基于springMVC hibernate spring的配置

    替代struts 1  web.xml中配置springmvc中央控制器 <?xml version="1.0" encoding="UTF-8"?> ...

随机推荐

  1. Linux学习笔记之Django项目部署(CentOS)----进阶篇

    一.引入 当我们开发好了一个Django项目之后是需要部署到服务器上的,这样才能正式使用这个项目.之前用了一个运行.sh文件的方法让项目得以在后台运行,其实随着学习的深入,这种方法其实是有点low的, ...

  2. php 的优化

    =>PHP函数禁用 disable_functions = phpinfo,passthru,exec,system,popen,chroot,escapeshellcmd,escapeshel ...

  3. 程序员50题(JS版本)(一)

    程序1:有1.2.3.4个数字,能组成多少个互不相同且无重复数字的三位数?都是多少? for(var i=1,sum=0;i<=4;i++){ for(var j=1;j<=4;j++){ ...

  4. Burnside引理与Polya定理

    感觉这两个东西好鬼畜= = ,考场上出了肯定不会qwq.不过还是学一下吧用来装逼也是极好的 群的定义 与下文知识无关.. 给出一个集合$G = \{a, b, c, \dots \}$和集合上的二元运 ...

  5. TS学习随笔(六)->断言

    now,我们来看一看TS里面的断言,听起来很上档次啊,其实看完你就发出惊叹,这就是断言啊 类型断言 类型断言(Type Assertion)可以用来手动指定一个值的类型 语法 <类型>值 ...

  6. #WEB安全基础 : HTML/CSS | 0x6嵌套标签(图片链接)

    嵌套标签我们已经讲一次了,在0X4.1里,我们把列表嵌套了 你觉得文字链接难看得令人作呕,好,你再也不会有这种感觉了   一如既往,一个html文件和一个存放图片的文件夹 index.html的代码, ...

  7. arcgis api 3.x for js 入门开发系列十叠加 SHP 图层(附源码下载)

    前言 关于本篇功能实现用到的 api 涉及类看不懂的,请参照 esri 官网的 arcgis api 3.x for js:esri 官网 api,里面详细的介绍 arcgis api 3.x 各个类 ...

  8. Python Django对接企业微信第三方服务回调验证的一些坑

    今天公司老总,叫我把公司的企业微信,服务商管理后台中的本地应用进行回调验证. 听起来一脸懵逼,没搞过企业微信对接情况.一头雾水,不知道如何下手. 先讲解一下,企业微信情况. 登录到企业微信后,右上角服 ...

  9. Windows Java包环境变量的设置

    复制Bin文件所在路径 验证

  10. tofixed方法 四舍五入

    tofixed方法 四舍五入 toFixed() 方法可把 Number 四舍五入为指定小数位数的数字.例如将数据Num保留2位小数,则表示为:toFixed(Num):但是其四舍五入的规则与数学中的 ...